Effacer les filtres
Effacer les filtres

Plotting numbers of main diagonal

2 vues (au cours des 30 derniers jours)
Feliciano Döring
Feliciano Döring le 23 Mai 2018
I have a matrix that in the main diagonal has values that vary slightly from 1, almost an identity matrix. How would i plot a graph with all the data in a way that each row represents a of the matrix represents it's own line of values? For example, on the first row there is a one and the rest is zeros, so it would be a line with a peak on the one and the rest a straight line, the second row there is a row on the second row, second column so a peak there and so one forming one big graph showing all the peaks.

Réponse acceptée

Matt J
Matt J le 23 Mai 2018
surf(yourMatrix,'FaceColor','none');
  3 commentaires
Matt J
Matt J le 23 Mai 2018
You mean like
N=size(A,1);
for i=1:N
subplot(N,1,i);
plot(A(i,:))
end
Feliciano Döring
Feliciano Döring le 23 Mai 2018
Yes, thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by