how to find the value of the diagnol of the attached image

2 views (last 30 days)
I hae attached the .mat file also in which the imagesc was performed

Answers (1)

Jon on 3 Dec 2021
From your matlab.mat file it seems that you are showing the image represented by the matrix corr_data.
You can get the diagonal elements of this matrix using:
d = diag(corr_data)
From what I can see they are all either 1 or NaN


Find more on Operating on Diagonal Matrices 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!