What is the simplest way to map vector values of float to matrix of floats ?

조회 수: 1 (최근 30일)
YI CHONG ONG
YI CHONG ONG 2020년 11월 22일
편집: Bruno Luong 2020년 11월 22일
I want to be able to map vector arrays to a matrix. This allows me to cache the values and proceed with more efficient runtime of an algorithm. I am thinking of using the map container object from matlab but it doesn't allow vector float values as keys. I am not sure if Matlab allows to store values as matrix.
Would anyone have an idea on what is the simplest way to do this ? I would also like to add and remove these vector keys during run time as well.
  댓글 수: 2
KSSV
KSSV 2020년 11월 22일
MATLAB is known as MAtrix Laboratory. You can save anything here as a matrix.
YI CHONG ONG
YI CHONG ONG 2020년 11월 22일
sorry, i meant if the values of the map container object can be matrix itself.

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

답변 (1개)

Bruno Luong
Bruno Luong 2020년 11월 22일
편집: Bruno Luong 2020년 11월 22일
The only vector of key map container supports is char vector (variable length)
If your vector has fixe length say n; you could nest n-mapcontainers with scalar as element #i of your vector. I doubt it will be efficient or convenient for coding.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by