Effacer les filtres
Effacer les filtres

How to assign a title to each row of a table?

2 vues (au cours des 30 derniers jours)
Kyana Shayan
Kyana Shayan le 17 Mar 2017
Hello Everyone,
I am trying to a make a 4*6 table which I only have the values for first row for now. When I try to assign names to the rows, I keep having this message. I can't find the problem, since I made a 2*8 table just in the same way before.
Thank you for helping me. Here is the code:
LastName = {'Analyical PSDs'; 'Experimental Non-smoothed Periodograms'; 'Experimental Smoothed Peridograms'; 'Time Traces'};
Velocity = var(1);
Angle_of_Attack=var(2);
Pitch_Angle=var(3);
Pitch_Rate=var(4);
Load_Factor=var(5);
Normal_Acceleration=var_one(5)*g^2;
Variance_Table = table(Velocity, Angle_of_Attack, Pitch_Angle, Pitch_Rate, Load_Factor,Normal_Acceleration, 'RowNames', LastName)

Réponses (1)

Sean de Wolski
Sean de Wolski le 17 Mar 2017
LastName = {'Analyical PSDs'; 'Experimental Non-smoothed Periodograms'; 'Experimental Smoothed Peridograms'; 'Time Traces'};
Variance_Table = table(rand(4,1), 'RowNames', LastName)
Works for me... What is the error message? Are you sure those variables have four rows?

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by