Ältere Kommentare anzeigen
hi, i have written a code in editor to find a value ,'phase_delay'
ip = menu('input is','ac','dc')% askin whether input is ac or dc
if ip==1
Vdc=inputdlg('dc output needed = ');
cos_alpha=((Vdc*pi)/(220)-1);
alpha=acosd(cos_alpha);
phase_delay=(alpha)/18000
end
now i want to put this value of phase_delay in "phase delay" of simulink/sources/pulse generator, automatically.
2 Kommentare
Walter Roberson
am 25 Feb. 2012
Side question: what should be done if "ip" is _not_ 1 ?
Also, is it correct that you prompt for the DC output needed only when the user selects AC (the first option, ip == 1) ?
prasoon purwar
am 27 Feb. 2012
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Sources 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!