필터 지우기
필터 지우기

Greetings, I want to plot a figure with two y-axis but I get the undefined function for the yyaxis right command

조회 수: 1 (최근 30일)
figure (1)
subplot(2,2,3)
E1=74e5;
Lz=3.5e-3:0.1e-3:8e-3;
d=10e-2;
IF=1/64*(pi*d^4);
Kz=2*1.8;
E=31;
h=0.16;
b=8.5;
n=1;
Pf=E1*IF*(n.*pi./Lz).^2+(Kz);
R=E*h*b./(2.*Pf);
yyaxis left
plot(Lz,R)
%hold on
Kz=2*3e4;
Pf=E1*IF*(n.*pi./Lz).^2+(Kz);
P=Pf*(1+Kz./(Ef.*0.6));
R=E*h*b./(2.*Pf);
yyaxis right
plot(Lz,R)

답변 (1개)

Steven Lord
Steven Lord 2022년 10월 28일
According to the yyaxis function documentation page, this function was "Introduced in R2016a". Which release are you using? If you're using a release prior to R2016a you'll need to upgrade to use this function.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by