Hi i have used matlab function in simulation and the function equation is
function y = ks(u)
y = u*lo;
end
I have difined lo in m.file at the same name of the function "ks"
lo=5;
evry time i eun the simulation i got error "Undefined function or variable 'lo'."

 Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 2 Okt. 2020

0 Stimmen

Define lo inside the function
function y = ks(u)
lo = 5;
y = u*lo;
end

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by