Thread Subject:
Problem with tablelookup in Simscape

Subject: Problem with tablelookup in Simscape

From: Francesco

Date: 1 Aug, 2013 07:05:11

Message: 1 of 1

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)
 

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
simscape Francesco 1 Aug, 2013 07:09:13
tablelookup Francesco 1 Aug, 2013 07:09:13
rssFeed for this Thread

Contact us