Subscript indices must either be real positive integers or logicals 頭痛死了
Subscript indices must either be real positive integers or logicals 頭痛死了
n_max=[30 25 22 23 21 20 19 17 16 12];
n_min=[60 51 45 46 42 40 38 35 33 25];
format long
r=[3.2 3.49 3.64 3.75 3.84 3.91 4.02 4.14 4.34 4.97]*10^-3;
su=[10000:10000:100000];
sita=zeros(10,10)
for i=1:10
for j=1:10
sita(i,j)=2*atan(((8*r(i)*su(j) + 9)^(1/2) - 1)/(4*r(i)*su(j) + 4));
end
end
%
oe=zeros(10,10);
be=zeros(10,10);
fbg=zeros(10,10);
bqe=zeros(10,10);
Asl=zeros(10,10);
Asd=zeros(10,10);
r1=zeros(1,10);
for i=1:10
for j=1:10
r1(i)=r(i)./cos(sita(i,j))-r(i);
be(i,j)=r(i).*sin(sita(i,j));
fbg(i,j)=(pi/2-sita(i,j))./(2*pi)*pi*(r1(i)).^2*sin(sita(i,j)).*cos(sita(i,j));
bqe(i,j)=sita(i,j)./(2*pi)*pi*r(i).^2.*sin(sita(i,j)).*cos(sita(i,j));
Asl(i,j)=(oe(i,j)*be(i,j)-fbg(i,j)-bqe(i,j))*8;
Asd(i,j)=(oe(i,j)*be(i,j)-fbg(i,j)-bqe(i,j))*12;
end
end
錯誤?Subscript indices must either be real positive integers or logicals.
Error in ==> hydric_test at 39
r1(i)=r(i)./cos(sita(i,j))-r(i);
請問這是什么原因?然后幫我改改程序啊
n_max=[30 25 22 23 21 20 19 17 16 12];
n_min=[60 51 45 46 42 40 38 35 33 25];
format long
r=[3.2 3.49 3.64 3.75 3.84 3.91 4.02 4.14 4.34 4.97]*10^-3;
su=[10000:10000:100000];
sita=zeros(10,10)
for i=1:10
for j=1:10
sita(i,j)=2*atan(((8*r(i)*su(j) + 9)^(1/2) - 1)/(4*r(i)*su(j) + 4));
end
end
%
oe=zeros(10,10);
be=zeros(10,10);
fbg=zeros(10,10);
bqe=zeros(10,10);
Asl=zeros(10,10);
Asd=zeros(10,10);
r1=zeros(1,10);
for i=1:10
for j=1:10
r1(i)=r(i)./cos(sita(i,j))-r(i);
be(i,j)=r(i).*sin(sita(i,j));
fbg(i,j)=(pi/2-sita(i,j))./(2*pi)*pi*(r1(i)).^2*sin(sita(i,j)).*cos(sita(i,j));
bqe(i,j)=sita(i,j)./(2*pi)*pi*r(i).^2.*sin(sita(i,j)).*cos(sita(i,j));
Asl(i,j)=(oe(i,j)*be(i,j)-fbg(i,j)-bqe(i,j))*8;
Asd(i,j)=(oe(i,j)*be(i,j)-fbg(i,j)-bqe(i,j))*12;
end
end
錯誤?Subscript indices must either be real positive integers or logicals.
Error in ==> hydric_test at 39
r1(i)=r(i)./cos(sita(i,j))-r(i);
請問這是什么原因?然后幫我改改程序啊
其他人氣:138 ℃時間:2020-01-29 22:24:50
優(yōu)質(zhì)解答
程序可運行,完全沒有錯誤.復(fù)制以下程序到一個m文件運行看看,注意清除變量.clear;clc;n_max=[30 25 22 23 21 20 19 17 16 12];n_min=[60 51 45 46 42 40 38 35 33 25];format longr=[3.2 3.49 3.64 3.75 3.84 3.91 4....
我來回答
類似推薦
- ? Subscript indices must either be real positive integers or logicals. 什么錯誤啊?
- matlab Subscript indices must either be real positive integers or logicals錯誤
- Cathy這個英文名怎么讀
- 向淀粉的酸性水解液中直接加入碘水檢驗淀粉是否水解完全
- Shall we go to the movie__?A.in this evening B.on that evening C.this evening D.last evening選擇題?
- 矩陣A,EA=AE么
- 怎樣判斷晨線和昏線 .
- 五岳歸來不看山 的上句是什么
- 三十一人去拔草,十八人去種樹,后又派二十人去支援,拔草人數(shù)是植樹人數(shù)的兩倍,支援拔草的人數(shù),等量關(guān)
- We played hide and seek in the morning.改一般疑問句,急
- 已知函數(shù)f(x)=2sin²(π/4+x)-(√2)cos2x-1,x∈R 1.求f(x)最小值
- 史記中秦始皇本記中說李斯是舍人.
猜你喜歡
- 1我在幕天席地的生涯中幕天席地什么意思
- 236.Do you think Tommy is ______ the truth?
- 3tall.old.young .strong.short.這些單詞的比較級
- 4近水樓臺先得月,向陽花木易為春是不是關(guān)于抒懷言志的詩句
- 5三角函數(shù)圖像 平移變換
- 6求下列各方程表示的圓的圓心坐標和半徑長
- 7下列現(xiàn)象中屬于做功使物體內(nèi)能增加的是:A水蒸氣將壺蓋頂起 2用火爐給水加熱 3鋼條在水泥地上摩擦變熱 4用太陽能熱水器對水加熱
- 8一個兩位數(shù),它的十位上的數(shù)字比個位上的數(shù)字大4且這個兩位數(shù)比構(gòu)成它的兩個數(shù)碼之和的7倍還要大3.
- 9請問 據(jù)說,我在娘胎時,就“登臺唱戲”了——母親在臺上唱,我在她肚子里唱.引號.破折號作用是什么
- 10九年級上人教版語文書第24課
- 11一個物體從40m的高處自由下落,下落多少米后該物體的動能和重力勢能相等?
- 12尋求靜心的道家心法