Hi everyone,
Could someone please tell me how to get MATLAB to do the following seemingly simple task..
j=1:3;
k1=1:3;
m=eye(3)
plot(j,symsum((p8+k1(j)).*m(p8,j),p8,1,3))
or,
k=1:3;
plot(j,sum((k+k1(j)).*m(k,j)))
Thanks for any suggestions,
Kate
Homework Statement
Given x' = y - 2
y' = \frac{1}{4}x-\frac{1}{2}
Draw the phase plane.
The Attempt at a Solution
First I found what I believe are the nullclines by taking x'=0 and y'=0.
x' = 0 = y -2
so y = 2.
y' = 0 = \frac{1}{4}x-\frac{1}{2}
so x = 2.
This...
I'm trying to plot the radial probability function for a hydrogen atom.
I have the function itself (Psi2*4*pi*r2) my problem is that when I plot the function with angstroms on the x-axis, the y-values are larger than they should be (they look about right if I divide them by the bohr radius in...
Hello friends;
The points in the source code is supposed to be drawn in 3-D,
S in source code means points in cartesian cordinate (X-Y-Z) respectively.
I am supposed to draw the points in 3-D graph.
Please friends, help me do this.
The source Code is below
a2 = 90; Rz1 =...
Homework Statement
I have an autocorrelation function given by
R(\tau) = J_0(2\pif_d\tau)
I have already plotted it in Matlab using the following commands
ts=0.0000001;
fs=1/ts;
fd=100;
tau=0:0.0000001:0.05;
R=besselj(0,2*pi*fd.*tau);
How do I plot its PSD in Matlab and the plotted picture...
how do i plot the follwing S-N diagram, i am having trouble with what I am supposed to do with the 'cycles to failure' figures:
stress amplitude ... cycles to failure
(y axis)- .... (x axis)
170 ...... 3.7 x 10^4
148 ...... 1 x 10^5
130 ...... 3 x 10^5
114 ...... 1 x 10^6
92 ..... 1 x...
Hi Everybody,
So basically I spent the summer working on some optics related stuff and now they want me to present my research work. This means I'm going to have to do numerical simulations for diffraction of Laguerre-Gaussian beam modes. In a word, the integrals are ridiculously long and...
Hi,
I am trying to write a short MATLAB program that plots concentration vs distance (oxygen sag curve from two different bod sources in a river). I know the equation I am using is:
C= Cs - [(kd*Mo)*(exp(-x*kr/u)-exp(-x*ka/u))/(Q*ka-kr)] - (Cs-Co)*exp(-x*ka/u) -...
I am trying to display a 3D density plot for my data [x,y,z] and have tried 'scatter3' however as some data points are the same it does not represent the density very well. There is a cool function called scattercloud on the file exchange, but this is only for [x,y] data. I would appreciate...
I've tried a few methods of plotting histograms from unsorted data, but they're all extremely involved (ROOT) or look very "childish" (online tools).
What's the easiest way of plotting a histogram from a unicode text file with numbers in it?
Thanks in advance - need the histograms for some...
Hello all,
I have written a python code implementing the Runge-Kutta fourth order method for higher orders to approximate the motion of a double pendulum. The problem I am having is that my plot of theta2 (angle of second rod) Vs time looks a little off and I am curious if I have it correct...
How do you plot arbitrary constants in mathematica? for example r(psi)=a(1-eCos(psi)), where a and e are some constant.
Thanks in advance for the help.
Hi,
I have two 2D functions (surfaces), s1(x,y) and s2(x,y) defined
via Interpolation. They intersect forming an intersection seam (which is a line).
I can plot both functions using Plot3D and I can also plot the seam on the same
3D plot by means of the MeshFunctions option. The comand I...
Hey i need help in ODE45...i'm new to PF...pls help me
i have the following code
>>for i=1:5
>>tspan=[0 30]
>>h0=Hv(i)
>>[t,h]=ode45['a ODEfunction',tspan,h0]
>>plot(t,h)
>>end
in this loop how can i save 5 values of [t,h],
as t, h produces each loop run like follows
t=
1
2
3...
Homework Statement
Hello all, I'm new to PF..Pls help..
I'm stuck in the following query.
I've MATLAB commands as follows:
Hv=[1,2,3,4,5]
for i=1:5
tspan=[1 30]
h0=Hv(i)
[t,h]=ode45[expression]
plot(t,h)
end
And here i need to see induvidual plots of my 5 results..I...
I was just wondering as to how I can plot the graph of y=1/log|x| without putting a lot of values of x and obtaining corresponding values of y.
I mean, how can I draw this graph using the graph of y=log x or the graph of log|x|? Is there a way?
Given the parametric function defined by x = a cos ^3t, y = a sin^3t, plot the curve.
So I converted the above to (x/a)^(2/3) + (y/a)^(2/3) = 1, and from that got y +-a(1-(x/a)^(2/3))^(3/2). However, I have no idea of how to actually plot a function of this form. Is my only choice to make a...
Homework Statement
Im doing a question where I have to graphc y = -4 sin x
Ok well I got the period and amplitude, so I have the interval of [0, 2pi]
Now, in order to plot points, I have to divide the interval into 4 sub intervals.
I don't understand how I do that! This is where I...
Homework Statement
Hi,
I'm taking Intro to Computing for Engr. and my highest level math course I have taken is Calculus I. I'm trying to solve this problem in my book for Intro to Computing for Engr. and believe that the math is over my head. This may well be the case. But sense this...
Hello I'm trying to plot log as part of an equation in mathematica and it does not seem to be working for me.
for example I'm using Plot y = 25x / log10 (x) - 50x
I'm just experimenting with different numbers and formulas to see what happens to the log curve...
OK, having been researching this of late, I've come to the conclusion it is far more complex than I first thought! So I guess without further ado, I'll jump into explaining my problem...
Aim:
Having established a set of initial conditions, I would like to be plot the trajectory of a...
Hi, I'm not sure if this is the correct section of the forum to post this but here it goes...
I'm looking for some plotting software (to run on Windows) that would be suitable for general use on an undergraduate physics course. I've played with "Grapher" on OSX and it seemed like the kind of...
any how, i have this equation. I have read a quick online tutorial on maple.
this is my equation in raw form
Br*(arctan(W*L/(2*x*(4*x^2+W^2+L^2)^(1/2)))-arctan(W*L/((2*(x+2*T))*[4*(x+2*T)^2+W^2+L^2]^(1/2))))/Pi
because i have 5 varibales, i did
B1(Br,W,L,T,x):= [the above function]
Now, i...
hey I was just wondering if anyone can teach me how to graph a signal like this
x[n] = { 1 for 0<=n<=4
{ 0 elsewhere
im not sure how to do this, what I have tried is
x = [1 1 1 1]
but this is not a function of 'n'.
Homework Statement
I've been trying to plot
Plot[x^2/4 - ln[x]/2, {x, 0, 5}]
And it keeps showing me a blank graph. I did it on Wolframalpha and it worked.
hi i want to load multiple sets of data in a loop and the plot a linear graph each time the loop runs below is my code so far, i can't seem to load any variable from the file names, the variable are for example int_force=[1;2;3;4;5] deflection=[1;2;3;4;5]
function load_data
clear all...
Homework Statement
Find/sketch the image of the function under the transform w = 1/z
Homework Equations
x=-1
The Attempt at a Solution
So, I decided to take the mapping 1/z as 1/(x+iy) For x=-1:
\begin{align}
w=\frac{1}{z}&=&\frac{1}{x+iy}&=&\frac{-1-iy}{1+y^2}
\end{align}
Getting u in...
Hi all,
I'd like to plot a family of curves corresponding to different values of an integer n (eg. sin(nx) for n=1,2,3...) on a single graph, along with some kind of indication as to what value of n each curve corresponds to. I'm using the command
Plot[Evaluate@Table[Abs[P[-t, n]], {n, 3...
Hi All,
I'm trying to plot some DiscreteDelta functions in mathematica but unfortunately since the points are singular nothing shows up in the plot.
Usually when this comes up I replace the delta functions with very narrow gaussians, graphically it looks even nicer (I'm plotting absorption...
All,
I am having trouble plotting nested lists.
I have two data sets (A and B), both with dimensions 5x50.
So far I have
plot = Map[
ListPlot[#, PlotRange -> {0, Max[A]},
AxesOrigin -> {0, 0}, Frame -> True,
FrameLabel -> {"position", "Intensity"}] &, A];
which...
1. okay, so I'm still struggling on trying to plot a graph for the relationship between the resonant frequency and the tension in a length of rubber cord, using standing waves. I've got that as the tension increases so does the frequency, and as length increases the frequency decreases. and...
I want to take a set of lists {list1, list2, list3, ..., list N} and plot them with color according to the following rule:Color set = { Hue[1-0.] , Hue[1/2], Hue[1/3], ... Hue[1/N] }
For any arbitrary number of sets... where Hue[1-0.] is used because Hue[1] is not defined.
Hello!
I'm having the following problem;
[PLAIN]http://www.hot.ee/jaaniussikesed/probleem_graafik.jpg
I try to plot a 1D matrice with a sequence, or a 1D matrice and I get a result that "this value must be real". Now... what!?
I am using MathCAD 14.
Help is much appreciated,
Uku
Hi all
This is my first time here, so I will do my best to explain what I need help with.
I have 2 sets of 11 xyz coordinates of some beads that I would like to plot in 3D. I want to show them in 3 space as a before and after (to represent a displacement of each point). I was able to...
I want to plot r vs. Total_thrust for all iterations on a single graph. I'm using 'hold on;' but it is still only plotting the last iteration. Help?
-------------------MATLAB CODE----------------------------------
Thrust = (mdot19*c19 + mdot9*c9)/gc; %Note: This is for one engine...
Hello, I'm currently studying general relatively and am trying to plot orbits of planets around the sun using the schwarzchild metric. I've worked out the geodesic equations, working with c=1 to simplify things, and written a MATLAB script to plot trajectories, but I'm struggling to work out...
i am trying to plot the output of a function given the transfer function and an input. however, i am having trouble with trying to express the input as a function in MATLAB
my transfer function is
m = 1;
b = 2;
k = 1000;
num = [ 1000 ];
den = [ m b k ];
transferfunction = tf(num, den)
so it's...
Basically, we have two functions. P1 and P2.
P1 Kicks in at t=0 and runs for a few seconds (a trig function). Then P2 starts, it's and exponential decay.
Below is what I'm trying to do.
I've tried to create time matrix and even ode solver. I need a way of plotting both functions on a...
Homework Statement
A=0.1+x^2 in a convergent -divergent nozzle .I need to plot mach number as a function of x for isentropic flow across the nozzle. I know the A/A* as a function of Ma. But finding the opposite (Ma in terms of A/A*) from that equation did not seem to be that easy...
I have a charge density I would like to plot in 3D
The data is currently in the format
x1 y1 z1 density
x2 y2 z2 density
etc
etc
where x,y,z are grid points. Can this kind of data be formatted as an xyz file? I know xyz is normally atom locations (I have no explicit...
I have m(t)=0.2sin(w1*t) + 0.5cos(w2*t) ---> Note: the 1 and 2 besides "w" (omega) is not a coefficient, its a subscript to show that they are different.
I found the Fourier transform to be M(F)=0.25[∂(f-f2)+∂(f+f2)] + 0.1j[∂(f+f1)-∂(f-f1)].
My question is, how do I sketch the magnitude...
Homework Statement
In lab, there was a string with a charged ball, and another charged ball moved closer to it. The ball's repelled and we had all sorts of data to calculate. I did a graph of the D vs 1/R^2 and the points fell almost right on. However, towards the end of that line, the...
I need to know the command to how to plot a piecewise function graph, All the ones I have found successfully plot but they "ranges" to go with the domain value.
The Two I have to graph don't have ranges or just have x(not equal to)= 0 or x=0
(Graphs are) attached
thanks
I have created a code to simulate a scaled random walk, but I need to now modify it to generate 1000 paths and then estimate the variance with n = 100, for t = 0.25, 0.5, 0.75 and 1. Can anyone help out with how to generate all 1000 paths? Sorry if this is painfully easy, I am a complete...
Hi I have an issue I am trying to solve, so far I haven't managed to get past it.
I have some data for 200 points in theta from 0 to 2PI. The data is spherically symmetric so there is no phi dependence. Basically what I want to do is turn the 2D plot into a 3D by revolving the 2D plot.
My...
Homework Statement
I want to plot into MATLAB the following function y(x):
when x is between 1 and 2: y=1
when x is between 2 and 3: y=2
.
.
.
when x is between 9 and 10: y=9
etc
I have tried a code. but this code only plots the curve for the final case (so y=9 when x is between...
I have found a magnitude to be the following:
4sin^(2) 2x + 4sin2xsinx + sin^(2)x
I now need to plot this using excel so I have rewritten it as:
4sin2xsinx + 2 -2cos(4x) + 1/2 - 1/2cos(2x)
4sin2xsinx +5/2 - 2cos(4x) -1/2cos(2x)
Using the fact:
sin^(2)x = 1/2 - 1/2cos(2x)...
I have been trying to plot a vector and it's derivative for a while now, but I cannot figure out why I can't get them to plot.
Here is what I put for my code...
a[t_] := Sin[t] Cos[2 t]
b[t_] := Sin[t] Sin[2 t]
c[t_] := Cos[t]
V[t_] := {a, b, c}
I tried this...