Scale plots with different steps
2 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Mathieu NOE
on 16 May 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);
More Answers (0)
See Also
Categories
Find more on Contour Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!