How do I store a figure inside a variable?
3 ビュー (過去 30 日間)
古いコメントを表示
I have my program creating and storing the figure data inside a variable however unlike other variables, when the program ends the values inside the created variable are cleared. If you reach the end by stepping through however, the values remain.
n.engine.powerCurveFig = figure;
title('Engine Power and Torque vs RPM');
xlabel('Engine Speed [RPM]');
xlim([n.engine.aRPM(1,1) n.engine.aRPM(n.engine.numStates,1)]);
set(gca,'xtick', (n.engine.aRPM(1,1):500:n.engine.aRPM(n.engine.numStates,1)));
grid on
yyaxis right
plot(n.engine.aRPM,n.engine.aTorque);
ylabel('Engine Torque [ft*lb]');
figure(n.engine.powerCurveFig);
yyaxis left
plot(n.engine.aRPM,n.engine.aPower);
ylabel('Engine Power [HP]');
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Polar Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!