当前位置: > 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

提问时间:2020-10-09

答案
程序可运行,完全没有错误.复制以下程序到一个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....
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.