plotting a family of curves
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
So I have a code that is something like this:
I'll first show what the code that produces the original picture looks like and then I'll ask about my second code and the picture that I WANT it to make, but am having troubles trying to get MATLAB to make it (which is what I would like to get help in regards to).
for c0=2:5
parfor i=1:16
ChangeParameter(i)=i*43.5;
Optimum(i)=somefunction(c0,ChangeParameter(i),c2,e1,e2,p,pi,N);
end
end
And that makes this picture:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/190655/image.jpeg)
Now, what I want to do is something like this:
for c0=2:5
for k=1:6
e2(k)=k*0.001;
for j=1:6
e1(j)=j*0.001;
parfor i=1:16
ChangeParameter(i)=i*43.5;
Optimum(i,j,k)=somefunction(c0,ChangeParameter(i),c2,e1(j),e2(k),p,pi,N);
end
end
end
end
(Basically to create a family of curves)
And I want it to make it to make a plot like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/190656/image.jpeg)
How would I go about doing that?
The way that I have it, the error message that it says is that the data cannot have more than 2 dimensions, which I get, but what I don't get is I don't want to have to write out the data for each of the plots as a .mat file only for me to then re-assemble it into a single plot that shows the variation of the e1 and e2 variables/parameters in order to produce a plot that shows the family of curves.
What would be the best way for me to do that?
As always, your help is greatly appreciated.
Thank you.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!