[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: plot octave graph by running .m file problem
From: |
Manpreet Dhiman |
Subject: |
RE: plot octave graph by running .m file problem |
Date: |
Tue, 13 Oct 2015 22:04:33 -0700 (PDT) |
Thank you , Allen
Actually I have written wrong values in the range of for loop. Now my graph
is plotted. But not exactly that I want. I am new for Octave and I have
plotted very simple graph. That way I am facing problem. Now I modify the
code as you suggest. see:
function k=value(doverA,aoverA)
up=(1-(aoverA)^2-(2*aoverA*doverA)-(doverA)^2);
down=(aoverA*doverA+(doverA)^2);
k=up/down;
end
for aoverA=0:5:100
for doverA = 0:0.05:0.30
k=value(doverA,aoverA) %calling of function
plot([0; aoverA(:,1)], [0;doverA],'-ro')
hold on
endfor
endfor
title('Curve Plotting');
xlabel('a/A');
ylabel('d/A');
This code plotting below graph
<http://octave.1599824.n4.nabble.com/file/n4672907/graphoctave.png>
But I want this graph . It means that it will take values from
(0.30,5,0.05,100)
<http://octave.1599824.n4.nabble.com/file/n4672907/IMG_20151013_175059.jpg>
Guide me. I need your advice.
--
View this message in context:
http://octave.1599824.n4.nabble.com/plot-octave-graph-by-running-m-file-problem-tp4672891p4672907.html
Sent from the Octave - General mailing list archive at Nabble.com.