|
Dear all,
I want plot the data getting from my program versus the spend time.
But the time is not a variable. I try to use the tic toc but I don’t
get the desired result. I don’t want to use something like t=[1:1:100]
because it doesn’t the same time every time to calculate the new
solution. Any idea?
My program has the following mode:
a=5;
b=3;
sol=[];
s=1;
for i=1:5
[s]=test(a,b,s);
sol=[sol;s];
end
plot(sol)
------------------------------------------
fun [s]=test(a,b,s)
syms x;
charfun=3*x^2 + 4*b*x + a*x^5 +s;
cal=solve(charfun);
s=max(cal);
Thanks for your time
|