Info

This question is closed. Reopen it to edit or answer.

I have two graphs (image below). I want to do a 3-D contour plot which will represent the difference in characteristics of these two graphs.How can I do that? Please help me. Two .mat files are attached.

4 views (last 30 days)
I have plotted following two graphs with this code:
clc
clear
close all
a=importdata('ranu normal.mat');
b=a.data;
x=b(23970:25750,1);
[val, idx] = max(abs(x));
plot(abs(x), 'b-', 'LineWidth', 2);
hold on;
plot(idx,val,'-o','markerfacecolor',[1 0 0]);
grid on;
line([idx, idx], [0, val],...
'LineWidth', 2, 'Color', 'r')
%Next Person
a=importdata('robin roy.mat');
b=a.data;
x=b(22500:24320,1);
[val, idx] = max(abs(x));
figure();
plot(abs(x), 'b-', 'LineWidth', 2);
hold on;
plot(idx,val,'-o','markerfacecolor',[1 0 0]);
grid on;
line([idx, idx], [0, val],...
'LineWidth', 2, 'Color', 'r')
  7 Comments
Biswarup  Dutta
Biswarup Dutta on 6 Apr 2017
I have done the following. But how can I create the z matrix? So that I can do "contour(x,y,z)".
clc
clear
close all
a=importdata('ranu normal.mat');
b=a.data;
x=b(23970:25750,1);
a1=importdata('robin roy.mat');
b1=a1.data;
y=b1(22000:25830,1);
[x,y] = meshgrid(x,y);
contour(x,y,z)

Answers (1)

Image Analyst
Image Analyst on 6 Apr 2017
Edited: Image Analyst on 6 Apr 2017

This question is closed.

Community Treasure Hunt

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

Start Hunting!