In contourf(), Force a matrix to begin at a specified value on the Y axis

1 vue (au cours des 30 derniers jours)
Joanne Hall
Joanne Hall le 9 Jan 2023
Commenté : Voss le 9 Jan 2023
Dear matlab,
I have a matrix that is a 32 X 7 double.
I'm doing cross-frequency coupling with EEG data.
The amplitude range on the Y axis goes from 9:40, and the phase range on the x axis goes from 1:7
The output matrix after running the algorithm = 32 X 7 double.
THE PROBLEM: In controuf(), I want to plot the matrix to begin at amplitude 9, BUT the matrix WANTS to begin at 1, so when I force the y axis using the ylim([]) function, it correctly sets the y axis to 9:40, BUT THE MATRIX STILL WANTS TO START AT 1:32, SO IT STOPS AT 32 AND LEAVES THE TOP PART BLANK/WHITE.
GOAL: force the matrix to begin at amplitude 9 on y axis and go up to 40 and fill the whole plot with beautiful colors
Attached is:
1) the data
2) an example output png image
Please advise.
Thanks very much in advance for your help (as always)!
Joanne

Réponse acceptée

Voss
Voss le 9 Jan 2023
load DataForMatlab
% specify x and y in contourf, increasing y by 8
[m,n] = size(MIcf4);
contourf(1:n,8+(1:m),MIcf4)
  2 commentaires
Joanne Hall
Joanne Hall le 9 Jan 2023
worked like a charm - thank you!!!
Voss
Voss le 9 Jan 2023
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Polar Plots dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by