matlab中This statement is incomplete.的错误

2024-11-22 22:22:50
推荐回答(2个)
回答1:

clear;clc;
R0=55;
R1=100;
R2=25;
Pa=0.1;
Pd=0.6;
Pv=0.1;
for r=0:0.01:100
if(R1>=r & r>=R0)
P=sqrt(Pd^2-(Pd^2-Pa^2)*log(r/R0)/log(R1/R0));
plot(r,P)
hold on
else if(R0>=r & r>=R2)
P=sqrt(Pd^2-(Pd^2-Pv^2)*log(r/R0)/log(R2/R0));
hold on
end
end
end

回答2:

1是自然数吗?