Call Function from .m file in command
Afficher commentaires plus anciens
Hi, So I have the below function that is saved in a .m file. All I want to do is call this function fromt he command line and enter in the values, but it keeps saying "Unrecognized function or variable 'CalculateLosses'."
function [Total_losses]= CalculateLosses(Output,Ron1,Ron2,Rg1,Rg2,Qg1,Qg2,Qrr1,Qrr2,Vth1,Vth2,Qo1,Qo2)
hs = lm25119_calcs;
hs.RdsOn = Ron1;
hs.Rg = Rg1;
hs.Qg = Qg1;
hs.Qrr = Qrr1;
hs.Vth = Vth1;
hs.Qoss = Qo1;
hs.Output = Output;
ls = lm25119_calcs;
ls.RdsOn = Ron2;
ls.Rg = Rg2;
ls.Qg = Qg2;
ls.Qrr = Qrr2;
ls.Vth = Vth2;
ls.Qoss = Qo2;
ls.Output = Output;
HsLoss = hs.HsFETlosses(hs,Output);
LsLoss = ls.LsFETlosses(ls,Output);
Total_losses = LsLoss +HsLoss;
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Adding custom doc dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
