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!