want to plot CIE-CHART but have some problem

xyz_primaries = rgb2xyz([1 0 0; 0 1 0; 0 0 1]);
xyzMag = sum(xyz_primaries,2);
x_primary = xyz_primaries(:,1)./xyzMag;
y_primary = xyz_primaries(:,2)./xyzMag;
wp = whitepoint('D65');
wpMag = sum(wp,2);
x_whitepoint = wp(:,1)./wpMag;
y_whitepoint = wp(:,2)./wpMag;
plotChromaticity
hold on
scatter(x_whitepoint,y_whitepoint,36,'black')
scatter(x_primary,y_primary,36,'black')
plot([x_primary; x_primary],[y_primary; y_primary],'k')
hold off
this all my codes i got it from matlab home but even run it doesnt work. :( what i did wrong

7 Kommentare

What exactly is wrong with it?
It seems to run for me.
xyz_primaries = rgb2xyz([1 0 0; 0 1 0; 0 0 1]);
xyzMag = sum(xyz_primaries,2);
x_primary = xyz_primaries(:,1)./xyzMag;
y_primary = xyz_primaries(:,2)./xyzMag;
wp = whitepoint('D65');
wpMag = sum(wp,2);
x_whitepoint = wp(:,1)./wpMag;
y_whitepoint = wp(:,2)./wpMag;
plotChromaticity
hold on
scatter(x_whitepoint,y_whitepoint,36,'black')
scatter(x_primary,y_primary,36,'black')
plot([x_primary; x_primary],[y_primary; y_primary],'k')
hold off
sevgul demir
sevgul demir am 14 Mär. 2022
wp = whitepoint('D65'); this part has problem when i run the same codes
Does it say that whitepoint is not found? The function needs Image Processing Toolbox, but has been in that toolbox for a long time.
DGM
DGM am 14 Mär. 2022
Bearbeitet: DGM am 14 Mär. 2022
I don't think it's a toolbox issue, since rgb2xyz() is IPT-only as well. I'm going to assume that there's probably a conflict.
What is the result when you run the following in the command window?
which whitepoint -all
Also, if you're getting an error message, what is the exact error message?
sevgul demir
sevgul demir am 14 Mär. 2022
License checkout failed.
License Manager Error -10
so sad it was license problem :(
Your Image Processing Toolbox license has expired.
sevgul demir
sevgul demir am 14 Mär. 2022
:(

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Produkte

Version

R2021a

Gefragt:

am 14 Mär. 2022

Kommentiert:

am 14 Mär. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by