Simscape Matrix input for lookuptable from file or workspace

조회 수: 3 (최근 30일)
Lukas Rohr
Lukas Rohr 2017년 6월 7일
댓글: Lukas Rohr 2017년 6월 12일
I'm using a lookuptable to reproduce the physical behavior of a real existing component.
To be able to compare different real existing components, I need a convenient way to Change the lookuptable to the corresponding characteristic diagram of the component suppliers. The existing Input vectors do not Change.
I thought of either giving a Matrix M from the Workspace as Input Parameter or a filename, which should be loaded at compile/Simulation time. But I couldn't find any clues on how to archive this.

채택된 답변

Don Zheng
Don Zheng 2017년 6월 12일
Which lookup table block are you referring to? Normally, you just need to put the name of the matrix in the block's parameter dialog and make sure the matrix exists in the workspace.
  댓글 수: 1
Lukas Rohr
Lukas Rohr 2017년 6월 12일
Thank you so far, this brings me to a better solution. For every other new_bee around, you can assign a variable into the Workspace by
assignin('base','Name_to_be_used_in_model',var_name)
However one still has to load the variables in the first place. I would like to do something like
parameters
my_paht_string_to_mat = 'c:\my_matrix.mat';
end
function setup
load(my_paht_string_to_mat)
end
The goal should be, that I can compile and share my simscape models library with others. It should be as convenient as possible.
If you have any idea, please let me know.
Thnak you =)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Foundation and Custom Domains에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by