GUI新手求助~~~,Matlab中创建GUI时出现错误 Attempt to reference field of non-structure array

2024-05-13 13:44

1. GUI新手求助~~~,Matlab中创建GUI时出现错误 Attempt to reference field of non-structure array

是不是你把控件的名字改变了啊,可能是没找到对应的模块
要其他人进一步调试的话,可能需要源文件

GUI新手求助~~~,Matlab中创建GUI时出现错误 Attempt to reference field of non-structure array

2. matlab 中运行之后出现以下问题 Attempt to reference field of non-structure array.求解释

你命令窗口editss看一下MATLAB能不能找到这个函数不能的话,看一下你的路径设置,是否全部添加进去了然后可能得重新设置环境变量了

3. Matlab 编程显示 Attempt to reference field of non-structure array.

首先:j没赋值:
其次:f2=f.exp*(j*10*t), 你的*位置错了,改成f2=f.*exp(j*10*t)

保存,运行,ok!

Matlab 编程显示 Attempt to reference field of non-structure array.

4. MATLAB 出错Attempt to reference field of non-structure array.

程序可以用。按下列方式运算
s=[1:16]';
dege_a=judge_edge(s,16)

5. MATLAB 问题:Attempt to reference field of non-structure array

你先单独输出P(x).r(i.j)

N(k).r(i,j)

M(x).r(i,j)

看看能不能输出吧

MATLAB 问题:Attempt to reference field of non-structure array

6. matlab问题 Attempt to reference field of non-structure array哪里出错了?????

你先单独输出P(x).r(i.j)

N(k).r(i,j)

M(x).r(i,j)

看看能不能输出吧
是否可以解决您的问题?

7. Matlab的??? Attempt to reference field of non-structure array.问题

上面程序,Matlab R2010a中运行正常。
没有出现错误。??? Attempt to reference field of non-structure array.
是不是你的Matlab有问题?版本?

Matlab的??? Attempt to reference field of non-structure array.问题

8. matlab Attempt to reference field of non-structure array.

楼主,不得不说你编程的时候不太细心啊,都是很小的失误的。
1.   A=zeros(m.n);改成A=zeros(m,n);
2.   canshu=X\Y;改成canshu=X\Y‘;
下面是偶改好的版本:
a=8*10^(-5);
c=3*10^8;
l=1i*2*pi*a*10^12/c;
n1=2+0.3i;
n2=4+0.8i;
n3=10+2i;
f=(0.1:0.01:3);
[m,n]=size(f);
R=zeros(m,n);
A=zeros(m,n);
B=zeros(m,n);
C=zeros(m,n);
for k=1:n
   X=[-1,1,1,0;
   n1,n2,-n2,0;
   0,exp(l*f(k)*n2),exp(-l*f(k)*n2),-exp(l*f(k)*n3);
   0,n2*exp(l*f(k)*n3),-n2*exp(-l*f(k)*n3),-n3*exp(l*f(k)*n3)]; 
   Y=[1,n1,0,0];
   canshu=X\Y';
   canshu1=canshu';
   R(k)=canshu(1);
   A(k)=canshu(2);
   B(k)=canshu(3);
   C(k)=canshu(4);
end
figure,plot(f,abs(A),'black')
%hold on
figure,plot(f,abs(B),'red')
%hold on
figure,plot(f,abs(C),'blue')
%hold on
figure,plot(f,abs(R),'yellow')
最新文章
热门文章
推荐阅读