Scale plots with different steps
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I have two data sets both achieved with different scales that i would like to plot together (one over another) but haven't been able to (correctly).
In the first dataset i have a 59x59 array in which x from [0->30] represents 1.2cm and [30->59] another 1.2cm (radius of a circle basicly).
In the other i have a 35x35 array in which [0->17] represents 1.28cm and [17->35] another 1.28cm.
How can i scale the two datasets in order to be plotted together?
I tried just creating a new 59x59 array and placing the 35x35 inside it centered but it obviously makes no sense as the widths don't make sense.
The plot i'm trying to do is a simple surf(data1) hold on contour3(data2).
How should i proceed?
Thank you
0 commentaires
Réponse acceptée
Mathieu NOE
le 16 Mai 2021
hello
my suggestion below
hope it helps
clearvars
load('Data1.mat')
measurements1 = measurements;
x = linspace(-1.2,1.2,size(measurements1,1));
y = x;
figure(1),surf(x,y,measurements1);
hold on
load('Data2.mat')
measurements2 = measurements;
x = linspace(-1.28,1.28,size(measurements2,1));
y = x;
contour3(x,y,measurements2);
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!