@Euler271 or anyone else, please help. matlab question! syms x y=sin(x^2)*cos(x) dy=diff(y,x) a=ezplot(y,[-pi,pi]); hold on b=ezplot(dy,[-pi,pi]); grid on title(['Graphs of y=sin(x^2)cos(x) and dy/dx by Bishwo Gurung']); xlabel('x-axis'); ylabel('y-axis'); set(a,'Color', 'blue', 'LineWidth', 2); set(b,'Color', 'red', 'LineWidth',2, 'LineStyle', '--'); legend('sin(x^2)cos(x)', 'dy/dx','Location', 'NorthEastOutside'); so, on the set command. i made y blue and dy red. but the figure makes the y red instead and dy blue instead. help?
@e.mccormick I don't understand this language
it's computer science , put it there, they will help you
It is matlab. Matlab is a mathematics software. @robtobey uses it, but he is off. They have some tutorials on their web site.
this is the matlab of calc3
http://mcise.uri.edu/sadd/mce372/Vector%20Calculus%20MATLAB.pdf http://archives.math.utk.edu/ICTCM/VOL12/C021/paper.pdf http://www.youtube.com/playlist?list=PL1E4E41F27812EEE8 http://www2.math.umd.edu/~jmr/241/calc.htm
try swapping a=ezplot(y,[-pi,pi]); b=ezplot(dy,[-pi,pi]); the reason is you are plotting a first and then you are using HOLD ON. meaning it acquires value of a first which in this case based on the code is dy and then it plot b on it try this first , lets see if it works
i just checked. the graph was right the whole time. i mistook the dy graph for y and vice versa. silly me lol
but thx guys :)
@e.mccormick I use Mathematica 8, Home Edition, the only mathematics software I'm familiar with.
Ah, sorry. Rememberd the wrong software for you!
np
Join our real-time social learning platform and learn together with your friends!