필터 지우기
필터 지우기

Plotting curves with increasing radius.

조회 수: 1 (최근 30일)
karthik madhamshetty
karthik madhamshetty 2017년 3월 9일
댓글: KSSV 2017년 3월 9일
for dout = 11:0.5:100 for din = 1:0.5:90 mn = 5; mf = pi/4*(dout*dout-din*din)*13*7890*10^-6; k = dout/2^0.5; rn = 5.5;
J = (mn*rn^2 + mf*k^2)*2*pi/rn;
plot(dout,J);
end
end
Hi, I am using this code to plot dout vs J. But i end up getting only one value. how should i modify this code?
Thanks, karthik.

답변 (1개)

KSSV
KSSV 2017년 3월 9일
Are you expecting this?
dout = 11:0.5:100 ;
din = 1:0.5:90 ;
mn = 5;
mf = pi/4*(dout.*dout-din.*din)*13*7890*10^-6;
k = dout/2^0.5;
rn = 5.5;
J = (mn*rn^2 + mf.*k.^2)*2*pi./rn;
plot(dout,J);
  댓글 수: 2
karthik madhamshetty
karthik madhamshetty 2017년 3월 9일
It is not working.
I want to plot dout vs J.
It throws some error at mf
Error using * Inner matrix dimensions must agree.
Error in Plotting (line 5) mf = pi/4*(dout*dout-din*din)*13*7890*10^-6;
KSSV
KSSV 2017년 3월 9일
The above code, what I have copied will work. How you have tried the code?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Desktop에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by