How to get 1 output from 2 input using lookup table?

조회 수: 5 (최근 30일)
Noor Amira Ilyanie
Noor Amira Ilyanie 2023년 5월 16일
댓글: FannoFlow 2023년 5월 16일
I have set the table data, breakpoints 1 and 2 using my value.
But, I keep getting this error.
  댓글 수: 2
Luca Ferro
Luca Ferro 2023년 5월 16일
what values are you giving to channel 2 and channel 3? Also, click on edit and breakpoints to visualize the lookup table to have a better idea on how it works and how it looks like. I have the impression as it is defined is not really what you want
FannoFlow
FannoFlow 2023년 5월 16일
In your case, this lookup table is operating as
f(x,y) = z
Except rather than having a pre-defined function of 2 inputs retuning a calculated output, the lookup table is designed to be filled with a matrix of pre-calculated Z values.
In your case, you would need a 2D matrix of Z values (imagine plotting a surface with surf).
If thats what you want, then great! we just need to fix your table data. Currently its a 1D vectorl which is why you're getting the error that the sizes dont match. You need to expand that vector to a 2D matrix where there is a value for each row and column of your breakpoing vectors. So that would be a 3x3 matrix in your case.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by