Hello everyone, I created a simple script (TMAP.m) that has the current body:
function y = TMAP(u)A = 40e+03;B = 15e+03;n = 1;y = A*(u.^n).*exp(-B*u);end
And I added the block "Interpreted Matlab function" to my Simulink model. I indicated "TMAP.m" in the block properties, fed a digital clock as input and connected to output to a scope. The TMAP script is in the same folder as the Simulink model. When in workspace I create a dummy input vector, say 0:0.001:0 and feed it to TMAP (eg y = TMAP(0:0.001:1)) it works just fine. When I try to run the Simulink model, I get these errors:
- Undefined function 'TMAP.m' for input arguments of type 'double'.
- Error evaluating MATLAB function in 'VelocitySelectiveRecordingTMAP/TMAP'
Can anybody tell me what I am doing wrong?
THank you very much for your help
NB – tried also having TMAP doing y = sin(u) to be sure but still refuses to work
Best Answer