How to bring my time varying workspace data to if else loop in matlab program editor?

1 回表示 (過去 30 日間)
Drishya Dinesh
Drishya Dinesh 2020 年 3 月 22 日
ref is my workspace data and given as input to matlab function.
This is not working as i need!
I'm using matlab function
Program:
function betaref = fcn(ref)
min=1500;
max=150000;
for t=0:0.1:100
if (ref==0)
y=45;
elseif (ref>max)
y=90;
else
y=0;
end
betaref=y;
t=t+1;
end
  4 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 3 月 22 日
How are you calling the function?
Shiva Kalyan Diwakaruni
Shiva Kalyan Diwakaruni 2020 年 3 月 24 日
can you give examples like what is the expected output ? because it is working fine for me.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT-Files についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by