Graph looks like a dotted straight line
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Abhinandana R
am 24 Jan. 2019
Kommentiert: Abhinandana R
am 24 Jan. 2019
I need a exponential curve. but it looks like a horizontal dotted line. how could I get it?
u=0.01; i=22/7; g=716; l=0.1;
d=50; p=45; r=linspace(0,1,100);
m=tand(p)
a=(r-m*(d+l)).^-2-((r-m*l).^-2)
q=(i*r.^4*g)/(8*u*l)
tl=(2*u*q.*a)./(i*m)
tb=(i*m*tl)/(2*u*q.*a)
plot(r,tb)
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 24 Jan. 2019
tb=(I*m*tl)./(2*u*q.*a) % is equivalent to (I*m*(2*u*q.*a))/(I*m*2*u*q.*a))
so everything gets cancelled out , you will have a question why the first value of tb is NaN because when you divide zero by zero in matlab you get a NaN ( https://www.mathworks.com/help/matlab/ref/nan.html#f91-998317 )
2 Kommentare
madhan ravi
am 24 Jan. 2019
If you have symbolic math toolbox try the below
syms u q a I m tl
tl=(2*u*q.*a)./(I*m);
tb=(I*m*tl)./(2*u*q.*a) % will give you one the reason as described above
Note: I have changed variable i because matlab interprets it as complex number so to avoid confusion it's better to avoid naming a variable i and j.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!