Problem using imagesc plot for non uniform values
47 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Abhik Saha
le 5 Oct 2020
Réponse apportée : Maju Kuriakose
le 30 Mai 2023
I have to plot the imagesc using matlab. Where in the y array I have 16 different points for which x values are same, and the z values are different in each points and then for the next 16 different points for y array is same as the above y array but now x values are change compare to the previous x array and it is constant upto next 16 data points. The process continues for 320 data sets. How do I plot this using imagesc?
2 commentaires
Réponse acceptée
KSSV
le 5 Oct 2020
data = importdata("data_analysis.txt") ;
x = data(:,1) ; y = data(:,2) ;
z1 = data(:,3) ; z2 = data(:,4) ;
% Use interpolation
xi = linspace(min(x),max(x),300) ;
yi = linspace(min(y),max(y),300) ;
[X,Y] = meshgrid(xi,yi) ;
Z1 = griddata(x,y,z1,X,Y) ;
pcolor(X,Y,Z1)
shading interp
Plus de réponses (1)
Maju Kuriakose
le 30 Mai 2023
Use 'mesh' instead of imagesc. Then select appropriate 2D plane
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!