Numerical values into plot issue
Show older comments
I created a code that takes an initial guess for a distribution and then modifies it. After completing the code it then is supposed to plot the modified distribution, however it is plotting both the guess values and final values. My guess looks something like:
Tfuel = zeros(nr+1);
Tfuel(:) = 800;
The guess is then modified very much like the following statement:
Ttemp=0.5*dr*dr*(qvol/k+Tfuel(i+1)/(dr*dr)+Tfuel(i-1)/(dr*dr)+...
Tfuel(i+1)/(2*dr*dr*i)-Tfuel(i-1)/(2*dr*dr*i));
Ttemp=(1-w)*Tfuel(i)+w*Ttemp;
Tfuel(i)=Ttemp;
I used the basic plot command as:
plot(r,Tfuel)
Any idea why this is occurring? I have never had this issue before.
Thanks
1 Comment
karan
on 25 Nov 2011
use fplot as tfuel is still getting values as it is being used
Accepted Answer
More Answers (1)
karan
on 25 Nov 2011
0 votes
Use fplot
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!