# Compass of complex matrix, getting "dot indexing is not supported for variables of this type."

1 view (last 30 days)
Daniel Veselý on 29 Nov 2020
Commented: Star Strider on 29 Nov 2020
Hello,
I have a complex matrix, where I'm succesfull with showing the compass graph. Unfortunately, when I try to change the color of one of the vector, it results in this error:
"Unable to perform assignment because dot indexing is not supported for variables of this type."
My code is below. Thanks for any advice!
clear;
IABC = [230;-345-345i;230+115i];
a1=-0.5+0.8660i;
a2=-0.5-0.8660i;
IABC(3)=IABC(3)*a1;
PREVOD = [1,1,1;1,a1,a2;1,a2,a1];
I012 = 1/3 * PREVOD * IABC;
I012(1,1)=abs(I012(1,1))*exp(j*angle(I012(1,1)));%netočivá
I012(2,1)=abs(I012(2,1))*exp(j*angle(I012(2,1)));%sousledná
I012(3,1)=abs(I012(3,1))*exp(j*angle(I012(3,1)));%zpětná
NETOCIVA = I012(1,1);
SOUSLEDNA = [I012(2,1);I012(2,1)*a2;I012(2,1)*a1];
ZPETNA = [I012(3,1);I012(3,1)*a1;I012(3,1)*a2];
compass (SOUSLEDNA);
c1 = SOUSLEDNA(1,1);
c1.LineWidth = 2;
c1.Color = 'r';

Star Strider on 29 Nov 2020
See if this does what you want:
c = compass (SOUSLEDNA);
c1 = c(1);
c1.LineWidth = 2;
c1.Color = 'r';
.

Daniel Veselý on 29 Nov 2020
It did. Thank you very much!
Star Strider on 29 Nov 2020
As always, my pleasure!

R2020a

### Community Treasure Hunt

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

Start Hunting!