函数名与文件名一致,仍然不支持函数定义。

12 ビュー (過去 30 日間)
nxjhdmar
nxjhdmar 2023 年 5 月 25 日
回答済み: feubgcwe 2023 年 5 月 25 日
function lism(num,den,u,t)
numg=[10,20];
deng=[1,10,0];
[num,den]=cloop(numg,deng,-1);
v1=[0:0.1:2];
v2=[1.9:-0.1:-2];
v3=[-2:0.1:0];
u=[v1,v2,v3];
t=[0:0.1:10];
[y,x]=lism(num,den,u,t);
plot(t,y,t,u);
xlabel('');
ylabel('');
grid on;
错误: 此上下文中不支持函数定义。请在代码文件中创建函数。

採用された回答

feubgcwe
feubgcwe 2023 年 5 月 25 日
把你的文件名改为lism就好了。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange使用 App 设计工具开发 App についてさらに検索

Community Treasure Hunt

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

Start Hunting!