Calling a user defined function on a MAC computer

I am trying to call the below user defined function in Matlab for MAC:
loss_vec = lossgen(numberOfSimulations,f_above+f_below,l,scen_fit(ni),FixedSeed);
I gent the below errer message:
Undefined function 'lossgen' for input arguments of type 'struct'.
Error in PBB_Stress (line 68)
loss_vec = lossgen(numberOfSimulations,scen_fit(ni),FixedSeed);
But it works well on a Windows PC

답변 (1개)

Cris LaPierre
Cris LaPierre 2021년 2월 18일
편집: Cris LaPierre 2021년 2월 18일

0 개 추천

There is no platform-dependent differences in how to call a function. However, in order to find the function, the function must be defined at the bottom of your script, saved in your current folder, and the folder it is in must be added to your MATLAB Path.
To see the full function precedence, see this page.

카테고리

질문:

2021년 2월 18일

편집:

2021년 2월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by