필터 지우기
필터 지우기

3-D Look-up Table in Simulink

조회 수: 3 (최근 30일)
ALEXIS
ALEXIS 2014년 2월 17일
편집: ALEXIS 2020년 6월 18일
Hi, i want to implement a 3-D direct look-up table in Simulink. I have specifically 3 binary inputs, so 8 possible outputs. I can't understand how to use the 'table data'. What i need basically is something like: data=[1 2; 3 4] data(:,:,2)=[5 6; 7 8]. How do i define these into the block?

답변 (1개)

Sai Teja Paidimarri
Sai Teja Paidimarri 2020년 6월 18일
Hi Alixis,
Direct Look Up Table(LUT) is just like accessing data from matrix with the use of rows and columns.You need to define 3D matrix in 3D Direct LUT.
You can use the following command
reshape(single([data]),x_dim,y_dim,z_dim)
For example :
reshape(single(1:8),2,2,2)
Two 2D matrix are needed to specify 3D.it will have a data [1 3; 2 4] in 2*2*1 and [5 7;6 8] in matrix 2*2*2
Generated data using reshape will be in transposed order of matrix.
  댓글 수: 1
ALEXIS
ALEXIS 2020년 6월 18일
편집: ALEXIS 2020년 6월 18일
Hi Sai,
Thank you for your answer! You are just 6 years late :P

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by