how to use LUT form configuring matrix

2 ビュー (過去 30 日間)
TZ
TZ 2017 年 4 月 24 日
編集済み: Thorsten 2017 年 4 月 25 日
Hi, i have a matrix, that i set up it will have 200 integer values. i also have a vector of 200 values. i want that each matrix cell will get the value of the vector, for example if cell (200,345) has a value of 20, then it will get the value of the 20th cell of the LUT vector. i know i can do it by double loop, but my matrix is very big and it will take a lot of time, i was wondering if there is a faster solution for the problem. thanks

回答 (1 件)

Thorsten
Thorsten 2017 年 4 月 24 日
Use your matrix as index to LUT:
Mnew = LUT(M);
  2 件のコメント
TZ
TZ 2017 年 4 月 24 日
Hi Thorsten, i am not familiar with LUT function, and i don't seem to have it in my matlab version (2014a). or did i misunderstood you.
Thorsten
Thorsten 2017 年 4 月 25 日
編集済み: Thorsten 2017 年 4 月 25 日
Hi TZ, LUT is not a function. It is your vector with the 200 values. And M is your matrix.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by