Why my program always get '0' at initialization?
Mostra commenti meno recenti
function out=gett(A)
if A(1)==0
out=1;
else
out=0;
end
A(1)
end
My M-file Integrator block :initial condition=-2
Why my program always get '0' at initialization?
but workspace is correct output.
How should I avoid this case?



%
Risposte (1)
Azzi Abdelmalek
il 26 Gen 2013
Modificato: Azzi Abdelmalek
il 26 Gen 2013
Your Matlab function is not an integrator, your output signal is 0 or 1
if A(1)==0
out=1;
else
out=0;
end
3 Commenti
YEH
il 26 Gen 2013
Azzi Abdelmalek
il 26 Gen 2013
You are displaying the output of the matlab function. According to your code it is 0 or 1
YEH
il 27 Gen 2013
Categorie
Scopri di più su Debugging and Analysis in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!