core_diameter = [10 15 20 25 ];
a= ((3.14*1.38*2)); b= ((11.8*10^-6)); c= (0.10/0.80);
for core_diameter = core_diameter result = (((a/(b*c))*((976*10^-9)/(core_diameter*10^-6))^2)/1000); disp (result); %plt.scatter(core_diameter,result, color ='red');
plot(core_diameter,result)
hold on
end
%plt.show();

 Accepted Answer

You have to plot a marker if you are plotting single points in a loop.
Try this:
plot(core_diameter, result, 'pg')

2 Comments

Thanks alot it's working :)
As always, my pleasure!

Sign in to comment.

More Answers (1)

zarifah hamid
zarifah hamid on 18 Dec 2020
>> x= [1 2 3 4 5 6];
>> y= [3 -1 2 4 5 1];
>>plot(x,y)
why the graph does not come out?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!