Extracting X and Y coordinates from "blakechart" function

I would like to extract X and Y coordinates from blakechart function from RadarToolbox in order to compare two blakecharts in one figure where i can place them one over the other and compare the results.
For example when I use code bellow:
[vcp,vcpangles] = radarvcd(2800e6,170,20)
figure
[a] = blakechart(vcp,vcpangles)
and look at my variable "a" I can see that my desired variables are stored in "XData" and "YData"
Can anybody guide me how do I access them?
a =
Line (vcpLine-1) with properties:
Color: [0 0.4470 0.7410]
LineStyle: '-'
LineWidth: 0.5000
Marker: 'none'
MarkerSize: 6
MarkerFaceColor: 'none'
XData: [0.8543 0.8574 0.8605 0.8635 0.8664 0.8692 0.8719 0.8745 0.8770 0.8795 0.8818 0.8841 0.8862 0.8883 0.8902 0.8920 … ]
YData: [0 4.5188e-05 9.0697e-05 1.3652e-04 1.8263e-04 2.2903e-04 2.7569e-04 3.2261e-04 3.6977e-04 4.1715e-04 4.6473e-04 … ]
Show all properties

 Accepted Answer

Hi Ivan,
As per my understanding, "XData" and "YData" properties needs to be extracted from variable "a".
To do this dot notation can be used with the variable assigned to the object to access and change its properties.
Please refer to the code snippet below:
xData = a.XData;
yData = a.YData;
% Now xData and yData contain the X and Y coordinates respectively
Please refer to the following documentation for more information on working with objects:
I hope this helps!

1 Comment

Demo:
[vcp,vcpangles] = radarvcd(2800e6,170,20);
a = blakechart(vcp,vcpangles);
figure()
plot(a.XData, a.YData)

Sign in to comment.

More Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Products

Release

R2023a

Asked:

on 15 May 2024

Commented:

on 15 May 2024

Community Treasure Hunt

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

Start Hunting!