Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
Kyana Shayan
Kyana Shayan il 17 Mar 2017
Risposto: Sean de Wolski il 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)

Risposte (1)

Sean de Wolski
Sean de Wolski il 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?

Categorie

Scopri di più su Tables in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by