Draw the graph by calling the script
1 回表示 (過去 30 日間)
古いコメントを表示
I want to load two scripts and display them in one graph.
What should I do?
0 件のコメント
回答 (1 件)
Sudharsana Iyengar
2021 年 11 月 5 日
Ok let me give you a simple script that will do this work for you.
function drawscript(x,y)
plot(x,y)
set(gca,'TickLength',[0.02,0.025],'XMinorTick','on','YMinorTick','on','XMinorGrid','off','YMinorGrid','off','YAxisLocation','right');
end
Now this will be saved as drawscript. call it whenever you want to plot.
x=linspace(0,90,1000);
y=sin(x)
drawscript(x,y)
Now when you execute the above command then plot will be drawn. You can change your default ploting parameters by adding other things also. for instance changing it to log or no ticks no labels etc or marker size.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!