EDA365电子论坛网
标题:
MATLAB 动态结构引用的参数必须为有效字段的错误
[打印本页]
作者:
justlikethisis
时间:
2020-9-21 15:04
标题:
MATLAB 动态结构引用的参数必须为有效字段的错误
[filename,pathname]=uigetfile('C:\Users\Administrator\Desktop\2.txt','select file');
str_filename=[pathname,filename];
[p_ori,p_orj]=textread(str_filename,'%s%s');
p_orj=str2num(char(p_orj));
p=smoothly2(p_orj);
phi=-180:180;
S=2;
L=2.05;
lb=S/2*L;
t=S/2*(1+1/lb-(cosd(phi)+1/lb(1-sqrt(1-lb.*lb.*sind.(phi)*sind(phi)))));
- u& O5 c- Q9 V6 M7 c
$ R% ~9 \ O2 F9 K8 m$ a
[color=rgb(51, 102, 153) !important]
复制代码
9 D1 j$ ]" R9 V+ g
/ D8 I1 K' c1 b4 S
$ ]: f7 m+ r* C0 V- w+ `
这一句出现问题
; r3 C v1 V; B+ O5 [( @
t=S/2*(1+1/lb-(cosd(phi)+1/lb(1-sqrt(1-lb.*lb.*sind.(phi)*sind(phi)))));
9 ^ C1 O _# Q# _+ e5 h
7 }2 K8 B# s/ _( J9 Z
[color=rgb(51, 102, 153) !important]
复制代码
, r% N& {, O( B) R# n* j
, i; z: x/ n; Q- v0 _- F' W+ F0 G
错误信息如下,
4 t& {1 E' c: ^& Q2 I! P
??? Argument to dynamic structure reference must evaluate to a valid field name
' @$ ^8 f, i1 z5 v9 j; l
作者:
qq666888qqw
时间:
2020-9-21 15:46
& O& d: K; [2 ~- Q, {# {
sind.(phi)
; n }' F& X/ Q1 H- y
这里是不是少了什么东西?
5 x. n/ v6 J, J$ [8 x( q9 {: M4 L
matlab把它当结构体了
欢迎光临 EDA365电子论坛网 (https://bbs.eda365.com/)
Powered by Discuz! X3.2