Clear Filters
Clear Filters

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

2 views (last 30 days)
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)

Answers (1)

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

Categories

Find more on Tables in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!