Hi I'm really new to Matlab so you'll have to bare with me. I'm trying to plot a graph using the for function but to no avail.
I'm using the following code:
>> for a=2.0:-0.02:0.0
p=[f(a),g(a),h(a),r(a),t(a)] (where f,g,h,r,t are complicated functions of a I don't fancy writing down.)
R=roots(p)
C=imag(R)
c=C(1,1)
….
end
I'm looking to plot the complex part of the first root of each polynomial against each value of a or if its possible plotting the complex part of every root against a for every a on the same graph with different colours representing each root.
Thanks, sorry if the problem is ill described.
Best Answer