Changing switching frequency doesnt work

Hello,
i have a simulink model of an electrical circuit. With the matlab function i control the mosfets of the cuircuit.
I use following code
persistent Zeit if isempty(Zeit) Zeit = 2;
if maximum == u1 && minimum == u3 if t<Zeit y1=1; y4=1; else y6=1; y7=1; end if t-Zeit ==2 Zeit=Zeit+4; end
not this works great. But when i want to higher the switching frequency by lowering the variable Zeit it doesnt switch any more
persistent Zeit if isempty(Zeit) Zeit = 0.025;
if maximum == u1 && minimum == u3 if t<Zeit y1=1; y4=1; else y6=1; y7=1; end if t-Zeit ==0.025 Zeit=Zeit+0.05; end
Hope someone can help me.

1 件のコメント

Roger Wohlwend
Roger Wohlwend 2014 年 9 月 18 日
Please format your code so that it becomes more readable. And does the first piece of code work or does it not?

回答 (0 件)

この質問は閉じられています。

タグ

質問済み:

2014 年 9 月 18 日

閉鎖済み:

2022 年 12 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by