[Scilab-users] Stacked 2D plot in 3D
Rafael Guerra
jrafaelbguerra at hotmail.com
Sun Jan 28 13:53:28 CET 2018
Hi Claus,
Try the following code using param3d:
// START OF CODE
frequencies = [201 811 3183 12862 25113]'; // Hz; row vector
angles = [0 30 60 90]; // off-axis angles, degrees
m_norm = [ 1.0 0.9945629 0.9643959 0.8756431;
1.0 0.9914442 1.0244046 0.9414654;
1.0 0.9910279 0.9670986 0.8932413;
1.0 0.9339808 0.8378147 0.7067978;
1.0 0.8985782 0.7536068 0.5074218];
clf();
sp = gca(); // Get current axis handle
for i=1:length(angles) do
anglei = angles(i) + zeros(m_norm(:,i))
mi = 20*log10(m_norm(:,i)); // dB scale
param3d(frequencies,anglei,mi,alpha=50,theta=-110,flag=[2,4]); //
e = gce() //the handle on the 3D polyline
e.foreground = color('dark blue');
e.thickness = 2;
end
xgrid;
sp.log_flags = "lnn"; // x-axis log scale (frequencies)
sp.cube_scaling = "on";
xlabel("Frequency (Hz)");
ylabel("Angle (deg)");
zlabel("Mag (dB)");
// END OF CODE
Regards,
Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180128/3c79229e/attachment.htm>
More information about the users
mailing list