필터 지우기
필터 지우기

use LUT holding non integer numbers

조회 수: 2 (최근 30일)
TZ
TZ 2017년 4월 26일
댓글: TZ 2017년 4월 27일
Hi, i have a matrix of integers of values 0:200 and i have a LUT vector with 201 elements. i wanted to use the intlut function to insert the LUT values into the matrix, but the problem is that this funcrion restrict the LUT vector to be uint8/16 where my values are floating points. so basically i want to convert [1, 2, 3...] to [0.234, 4.323, ..] with the same logic of the intlut function that cell with value 4 will get the 4th calue in the LUT vec. is there another function that enables the LUT vector to be non int8? thanks

채택된 답변

Jan
Jan 2017년 4월 26일
LUT = rand(1, 201);
Data = randi([0, 200], 32, 32);
Result = LUT(Data + 1);
  댓글 수: 3
Jan
Jan 2017년 4월 27일
There is no LUT function. LUT is a simple vector here and the look-up process is standard indexing.
TZ
TZ 2017년 4월 27일
oh.. feel so stupid, i understand what you did, thanks.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler SDK에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by