Call Function from .m file in command
이전 댓글 표시
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
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Adding custom doc에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
