Find duty cycle of DC-DC buck-boost converter in Matrix

1 vue (au cours des 30 derniers jours)
Mansour Hawsawi
Mansour Hawsawi le 10 Sep 2022
I need to calulate the duty cycle for buck-boost converter in matrix, I have code as following
vin = randi ([10 100], 1, 100000);
vout = randi ([100 1000], 1,100000)
D= vout/(vout-vin);
when I run the code it just give me one value so I need to know how get the whole value of matrix
when I do the following, D= vout/(vout-vin).
I got error says " Invalid use of operator"

Réponses (1)

Joel Van Sickel
Joel Van Sickel le 19 Sep 2022
You should use "./" instead of "/", this changes it to a vector operation instead of a matrix operation.

Catégories

En savoir plus sur Electrical Block Libraries dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by