Hi everyone! I don't know what to do with this error. I've tried so many times.
I know it's a very simply case, but I'm new to Matlab.
This is my code.
function Y=fpendolo(U)
u=U(1);
x1=U(2);
x2=U(3);
and everytime it says ''??? Input argument "U" is undefined.
Error in ==> fpendolo at 10
u=U(1);''
Thanks everyone!

回答 (1 件)

David Hill
David Hill 2022 年 4 月 6 日

0 投票

U=1:3;%setup variable
[u,x1,x2]=fpendolo(U);%call function
function [u,x1,x2]=fpendolo(U)
u=U(1);
x1=U(2);
x2=U(3);
end

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

製品

リリース

R2010b

質問済み:

2022 年 4 月 6 日

回答済み:

2022 年 4 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by