MATLAB Answers

Storing the results from a loop using tool box functions in a new matrix

1 ビュー (過去 30 日間)
Sascha Hein
Sascha Hein 2019 年 12 月 19 日
回答済み: the cyclist 2019 年 12 月 19 日
Hi there,
I'm calling a bunch of functions from the color toolbox for spectral data (p=31x3) to be converted to CIELAB values which I would like to store in a new matrix. This is my code:
for col = p
[xyz] = r2xyz(col,400,700,'d65_64');
[XYZ] = sum(xyz);
[lab] = xyz2lab(XYZ,'d65_64')
What I'm getting in the workspace is correct:
lab =
100.1127 -0.0331 0.0521
lab =
83.4176 0.7851 26.2322
lab =
86.5516 0.4043 22.8907
But I'd need to store these values in a new 3xn matrix called LAB
Most of the solutions offered in the community don't work because I'm using these functions.
Any advice is appreciated.

  0 件のコメント

サインイン to comment.


the cyclist
the cyclist 2019 年 12 月 19 日
I think instead of
[lab] = xyz2lab(XYZ,'d65_64')
lab(col,:) = xyz2lab(XYZ,'d65_64')
should do what you want

  0 件のコメント

サインイン to comment.

その他の回答 (0 件)

サインイン してこの質問に回答します。



Translated by