|
Hi,
I have a problem when trying to create a custom block using Simscape. When I try to use the function "tablelookup" in the equations section, I get the following error:
??? Error using ==> startup_EngineCooling at 4
Failed to generate 'EngineCoolingComponents_lib'
Caused by:
Error using ==> TwoPortsCompressible>equations at 38
Unexpected function or variable 'tablelookup'.
The code I used is the one posted at http://www.mathworks.com/matlabcentral/fileexchange/38339-engine-cooling-model-in-simscape/all_files for the model of the cooling systems of an engine.
At first, I had a problem with an error of the form "Unexpected MATLAB operator" which referred to the "=" symbol in the line
uin == tablelookup(A.TTLU, A.pTLU, A.uTLU, Tin, pin, interpolation = linear, extrapolation = nearest);
So I tried to modify the code in this way:
uin == tablelookup(A.TTLU, A.pTLU, A.uTLU, Tin, pin);
which lead to the error I showed earlier in the post.
Could anyone please help me? I believe it must be a rather basic error, but I do not see where it might be (I am quite a beginner with Simscape, honestly said)
|