I attached a file with some explanations of the variables in the code and the plot that I should get. I don't know what is wrong. Any help will appreciated.
from scipy.integrate import quad
import numpy as np
from scipy.special import gamma as gamma_function
from scipy.constants import e...
This is the code line that i used to generate the following graphs
ParametricPlot3D[{{1 + Cos[t], Sin[t],
2*Sin[t/2]}, {2 *Cos[t]*Sin[\[Phi]], 2*Sin[t]*Sin[\[Phi]],
2*Cos[\[Phi]]}}, {t, 0, 2 \[Pi]}, {\[Phi], 0, \[Pi]/2},
PlotStyle -> {Directive[Green, Thickness[0.025]], Yellow}...
I think that if we plot an inertial frame in the XY axis separated 90º, the photon, which has a velocity of c, should be put on one of the branches of the light cone. The questions are:
Which branch, left or right one?
Which position along the branch, if I don't know the distance it has...
A DI-149 data acquisition module was used to record a microwave oven transformer (MOT) primary voltage and current time histories. The secondary of the MOT was open. The DI-149 analog input specs are: +- 10 volts full scale, 5000 samples per second for each channel (assuming two channels being...
Be the red point this spacecraft , the purple line the world line with slope = 2 and the green point a photon thrown towards the Earth from the spacecraft , would this spacetime diagram ok? (distance would be 1.2 billion km, and the time, 1000 times of shown, but scale is badly displayed, even...
Hi
I have saved data in pdf format, and I wish to generate a plot from this data.
The data is iterations of optimising some function.
I can't just copy and paste it into the live window obviously and then try to generate a figure, so how can I generate a figure, just as I would have done...
I would like vertical lines with dots at the top of them, with the x-positions and heights coming from
{{1.2, 3.5}, {2.3, 4.2}, {5.5, 6.7}} for example.
[Moderator: moved from a homework forum. This does not sound like homework.]Homework Statement:: Why is it the case that when the low-frequency response is to the right of the M = 1 line that the 'speed of response is slow'?
Relevant Equations:: M-cirlces
Hi,
Hope you are doing well and...
Summary:: 1. At what distance (in km) would a telescope (roughly half the size of Hubble) be able to actually make out features on an approaching object with a 75m cross-section?
Hello Everyone,
New to the forum, but I've been reading a lot of other posts here and am consistently impressed...
Hello, good morning.
I would like to know if someone knows a program to be able to draw the functions in the same way as the one shown in the image and also allow me to point out an enclosure formed by them without having to use inequalities to do so.
Thank you very much for everything beforehand.
import numpy as np
from scipy.integrate import odeint
import matplotlib.pyplot as plt
c=0.65
g=9.81 # gravitational force on earth
angle=50 # angle at which projectile is launched
m=0.1
#returning dx/dt, dy/dt, dv/dt as an array
def model(yaf,t):
x=yaf[0] # x position is first element of yaf...
Summary: I am studying inverse functions and want to see a plot of an inverse function.
I hope this is an OK post here.
Lets say I have a function y = x^3 + x. This function has n inverse sine the derivitave is always positive and is a one on one function.
I can easily graph this function...
I have a PDE which I have solved numerically using a guass-seidel method, but I want to compare it to the analytical solution. I have used separation of variables to get the general solution, but I need help applying it.
The PDE is
(1/s)⋅(∂/∂s)[(s/ρ)(∂ψ/∂s)] + (1/s2)⋅(∂/∂Φ)[(1/ρ)(∂ψ/∂Φ)] - 2Ω...
First image showing script and plot
Second image where all I have done is slightly change the thickness and now the plot looks very weird.
Final image showing the kind of plot I am expecting.
Am I just doing something stupid as I can't see what is wrong/different between my equations and the...
Summary: For fictional purposes, looking for a cancer which has a very low survival rate but which a patient might be fighting for 1-2 years
I'm sure that this is actually a fairly common sub-genre of medical questions, authors asking for a disease to fit a story.
I have a lot of side...
Hello all,
I have designed an intake manifold for boxer-6 naturally aspirated petrol engine with 1:1 bore to stroke ratio and has a bore dia of 117.89mm and a volume of 7.8l as part of my master's project. The engine was to produce 450 bhp @ 6500 rpm and I did set a rev limit @7500 rpm. The...
I've produced a plot showing a best fit value and one with error estimate included (the dashed yellow line). I want to shade the region between the best fit value and this yellow line. As can be seen, the gnu plot filler I use is not optimal and leaves a residual jaggy effect and the shaded...
Here is a picture of these plots from a paper:
When I try to reproduce the 3rd graph above (yellow line below), I get sharp discontinuities:
Those jump discontinuities should not occur, and the function should never rise to the high value of the two other plots. So, what could be the cause...
I am trying to link the upper axis with the lower axis in gnu plot, that is print out values on the upper axis given a relationship between the upper axis, x2, quantities and the lower axis, x, ones. The relationship between them is
x2 = 2*c**2/(2*x**2-c**2) with c=3.1
The following should be...
How could I improve the below code to fit all the xtickslabels on my plot more nicely (i.e. more spacing between the labels, higher resolution)? Thanks!
from pyplot import *
yearmonthday=['2003-01-01', '2003-02-01', '2003-03-01', ...] #len(yearmonthday) is 155
kwh = [88883, 99221, 100002, ...]...
On Ned Wright's pages one can find this graph:
plotting some supernova data against different expansion models.
The main thing here that gives me a pause is the linear relationship for the closed universe with ##\Omega##=2 (red line). There doesn't seem to be any weird scaling involved. What is...
I am using the TMESH tally to try and get the flux of a 1 MeV point source through a spherical MESH a distance of 1cm away from the origin and covering all polar and azimuthal angles. When I try to plot using the RUNTPE function I get the error "no tally no plot". I also do not see tally...
Hello,
I want to plot this PDE which is non homogeneous:
ut=kuxx+cut=kuxx+c
u(x,0)=c0(1−cosπx)u(x,0)=c0(1−cosπx)
u(0,t)=0u(1,t)=2c0u(0,t)=0u(1,t)=2c0
I have a code that can solve this problem and plot it with those boundary and initial conditions but not with the non homogeneous term...
Hi, I want to plot the vector field ##\vec F = ye^x \hat i + (x^2 + e^x) \hat j + z^2e^z \hat k##
The code I have tried:
# The components of the vector field
F_x = y*e**x
F_y = x**2 + e**x
F_z = z**2*e**z# The grid
xf = np.linspace(-0.15, 2.25, 8)
yf = np.linspace(-0.15, 2.25, 8)
zf =...
I asked this question on SO, but I am having problems with it (I cannot even get into my account now). It seems that people using the IP I am using are asking a lot and that limits the number of questions I can ask. Please have a look at my question. Here's the link:
[Moderators note: bold large...
I wrote the following code in MATLAB:
t = [0:0.001:0.1];
noise = randn(1,size(t,2));
a = 15*10^9;
b = 15*10^(-3);
c = 7*10^8;
y = a*exp(-t/b)+c+noise*100000000;
fun = @(p,t)p(1)*exp(-t/p(2))+p(3);
p0 = [15.5*10^9, 14*10^(-3), 6*10^8];
p = lsqcurvefit(fun, p0, t, y);
t_fit = [0:0.0001:0.1];
y_fit...
Hi I want to plot the function ##y=\sin(x)/\log(x)## in MATLAB but I get the next error message:
Warning: Imaginary parts of complex X and/or Y arguments ignored
Here is the script that I used:
x = -2*pi:pi/100:2*pi;
y = sin(x)/log(x);
plot(x,y)
How to fix this that I'll get the plot on the...
Homework Statement
I have phase space coordinates (x0,y0,z0,vx,vy,vz)=(1,0,0,0,1,0). I need to analytically show that these phase space coordinates correspond to a circular orbit.
Homework Equations
r=sqrt(x^2+y^2+z^2) maybe?
The Attempt at a Solution
My core problem here is maybe that I...
just something I need quickly to illustrate a homework help, don't want to spend much time on.
What is the code in WolframAlpha just to plot an ornery family of curves?
Searched WA and find all sorts of fancy things, not this ornery one.
Should. be something like e,g.
For n= 1 to 20 c= n*0.05...
I have a few of integration equations and need to convert it into Python. The problem is when I tried to plot a graph according to the equation, some of the plot is not same with the original one.
The first equation is the error probability of authentication in normal operation:
cond equation...
Hi PF!
I'm solving a 2D PDE using NDSolveValueMesh. On one boundary I apply a Neumann BC. Attached are two plots: the top is the boundary condition and the functional value. Notice both are exactly the same.
However, the lower plot shows a directional derivative evaluated on the same boundary...
The Earth's magnetic field is cylindrically symmetric and can be described using cylindrical coordinates, (ρ,z,φ). The components of the magnetic field are given by:
(B_φ) = 0
(B_ρ) = −∂A/∂z,
(B_z) =(1/ρ) * ∂(ρA)/∂ρ.
The vector potential for a dipole field is given by
(A_φ) = (B_e)(ρ) *...
Homework Statement
Serway Physics Section 2.4 Acceleration
15. A velocity-time graph for an object moving along the x-axis is shown in Figure P2.15.
(a) Plot a graph of the acceleration versus time. Determine the average acceleration of
the object (b) in the time interval t=5.00 s to t=15.0 s...
Homework Statement
The problem is given in the attached picture, but I already have a solution to part a) which I am confident in (I have checked it carefully, compared to other students and confirmed it with my graduate-TA).
Part b) asks us to plot the equipotentials but I cannot figure out...
I wonder if there is a way to calculate induced EMF in closed loops around bar magnet, which is traveling with constant velocity v to the right as depicted?
I have a dataframe that looks as attached. What I aiming to do is to plot the lines for each type where if it is for type A, I want to be able to have two lines in the graph that shows the trend for type A. I was not able to find any examples online especially with the format of the data in this...
I have a python code where it generates two 1D arrays, plots them using scatter plot and then draws colorbar using normalization range. How can I find individual values at those individual pixel points?
HC = data["HC"]
OC = data["OC"]
sample = y
widthmm, heightmm = 171, 233
ratio =...
i have a dataset that has the timestamp data within each row and I am trying to plot the values to see the distribution but have no idea how to do it if the data is presented this way as attached. any ideas? thanks
If the length and width of a rectangle garden plot were each increased by 20 percent, what would be the percent increase in the area of the plot?
My Work:
Here I am thinking geometry mixed with algebra.
The area of a rectangle is found by using A = bh.
A = (0.20)(0.20)
Correct set up?
Homework Statement
The position of a particle as a function of time is given by x=Acosbt, where A and b are constants. The first question asks to roughly plot the position of the particle over the time interval (0,7) seconds.
The second asks what time the particle passes the origin, and what...
To the users of the MCNP VISED version, if you please, Can I plot tallies of different or changed materials in the input file together in one plot using runtpe files?
thanks in progress.
Hi PF!
Given a vector field ##\vec f## in spherical coordinates as a function of a single parameter ##s##, shown here as
$$\vec f(s) = f_r(s) \hat r + f_\theta(s) \hat \theta + f_\phi(s) \hat\phi$$
where here subscripts do not denote partial derivatives, but instead are used to define...
Hi. So I have a story idea and my main plot device has something to do with time. I want it to be a more science fiction than fantasy so I was hoping someone could help me. The general idea is, a man falls asleep only to wake up 20 years in the future, in one night, he cannot remember the last...