embedded matlab function error
Ältere Kommentare anzeigen
in embedded matlab function file error is
Undefined function or variable 'y'. The first assignment to a local variable determines its class.
code is here:
function y = fcn(Vreq)
%#eml
Vact=230;
duty=(Vreq/Vact);
Fs=50;
Ts=1/Fs;
i=1;
t=0:Ts:1-Ts
for k=0:Ts:1-Ts
if(k<=duty)
y(i)=1
else
y(i)=0
end
i=i+1;
end
end
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!