Question about representation of data in Matlab

Click For Summary
SUMMARY

The discussion focuses on plotting a matrix of sea surface temperature correlations in MATLAB using the quiver function. The user encounters an error due to mismatched sizes of the input variables when attempting to overlay significant data on the existing plot. The suggested solution involves ensuring that all variables passed to quiver have the same dimensions, which is critical for successful execution. The user is also directed to the official MATLAB documentation for quiver for further guidance.

PREREQUISITES
  • Proficiency in MATLAB programming, particularly with matrix manipulation.
  • Understanding of plotting functions in MATLAB, specifically imagescnan and quiver.
  • Familiarity with data representation and visualization techniques in scientific computing.
  • Knowledge of handling significant data in statistical analysis.
NEXT STEPS
  • Review the MATLAB documentation for quiver to understand its parameters and requirements.
  • Learn about matrix dimension compatibility in MATLAB to avoid size-related errors.
  • Explore alternative plotting functions in MATLAB for visualizing significant data, such as scatter or contour.
  • Investigate data preprocessing techniques to filter significant values before plotting.
USEFUL FOR

This discussion is beneficial for MATLAB users, data scientists, and researchers involved in environmental data analysis and visualization, particularly those working with matrix data and seeking to enhance their plotting techniques.

Frank Einstein
Messages
166
Reaction score
1
Hi everybody; I have plotted a matrix with sea surface temperature's correlation with another variable, the size is (360x180x12); using to plot :

figure
for i=1:12
subplot(4,3,i);imagescnan(loni,lati,squeeze(double(r4_sat(:,:,i)))'),colorbar;
end


Now, I want to plot over it another matrix of the same size which contains the same data but only when it is significative; I think the comand quiver would be suitable for this, but when I try to use it, there is an error.

figure
for i=1:12
subplot(4,3,i);imagescnan(loni,lati,squeeze(double(r4_sat(:,:,i)))'),colorbar;
hold on
subplot(4,3,i); quiver(loni,lati, r4_sat_sign(:,:,i), r4_sat_sign(:,:,i));
end

The error comes from the fact that I need to have the same size for all four variables, but I don't know how to manage it.

Can someone please tell me how to properly use quiver here or sugest an alternative?
Thanks for reading.
 
Physics news on Phys.org

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
2
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
8K