How to display entire row

4 views (last 30 days)
DWU2020
DWU2020 on 10 Feb 2019
Commented: Star Strider on 11 Feb 2019
Alti = [-5000; 0; 5000; 10000; 15000; 20000; 25000; 30000; 35000; 40000; 45000; 50000; 60000; 70000; 80000; 90000; 100000; 150000; 200000; 250000];
Temp = [76.84; 59; 41.17; 23.36; 5.55; -12.26; -30.05; -47.83; -65.61; -69.70; -69.70; -69.70; -69.70; -67.42; -61.98; -56.54; -51.10; 19.40; -17.78; -88.77];
Pres = [17.554; 14.696; 12.228; 10.108; 8.297; 6.759; 5.461; 4.373; 3.468; 2.730; 2.149; 1.692; 1.049; 0.651; 0.406; 0.255; 0.162; 0.020; 0.003; 0.000];
Dens = [27.45; 23.77; 20.48; 17.56; 14.96; 12.67; 10.66; 8.91; 7.38; 5.87; 4.62; 3.64; 2.26; 1.39; 0.86; 0.56; 0.33; 0.037; 0.0053; 0.00065];
Visc = [3.836; 3.737; 3.637; 3.534; 3.430; 3.324; 3.217; 3.107; 2.995; 2.969; 2.969; 2.969; 2.969; 2.984; 3.018; 3.052; 3.087; 3.511; 3.279; 2.846];
AtmProp = table(Alti, Temp, Pres, Dens, Visc);
I want be able to specify a specific Alti number and have it display the entire table row. Any suggestions?

Accepted Answer

Star Strider
Star Strider on 10 Feb 2019
Try this:
Alti = [-5000; 0; 5000; 10000; 15000; 20000; 25000; 30000; 35000; 40000; 45000; 50000; 60000; 70000; 80000; 90000; 100000; 150000; 200000; 250000];
Temp = [76.84; 59; 41.17; 23.36; 5.55; -12.26; -30.05; -47.83; -65.61; -69.70; -69.70; -69.70; -69.70; -67.42; -61.98; -56.54; -51.10; 19.40; -17.78; -88.77];
Pres = [17.554; 14.696; 12.228; 10.108; 8.297; 6.759; 5.461; 4.373; 3.468; 2.730; 2.149; 1.692; 1.049; 0.651; 0.406; 0.255; 0.162; 0.020; 0.003; 0.000];
Dens = [27.45; 23.77; 20.48; 17.56; 14.96; 12.67; 10.66; 8.91; 7.38; 5.87; 4.62; 3.64; 2.26; 1.39; 0.86; 0.56; 0.33; 0.037; 0.0053; 0.00065];
Visc = [3.836; 3.737; 3.637; 3.534; 3.430; 3.324; 3.217; 3.107; 2.995; 2.969; 2.969; 2.969; 2.969; 2.984; 3.018; 3.052; 3.087; 3.511; 3.279; 2.846];
AtmProp = table(Alti, Temp, Pres, Dens, Visc);
Result = AtmProp(Alti == 30000,:)
producing:
Result =
1×5 table
Alti Temp Pres Dens Visc
_____ ______ _____ ____ _____
30000 -47.83 4.373 8.91 3.107
  2 Comments
DWU2020
DWU2020 on 11 Feb 2019
Awesome, and thank you!
Star Strider
Star Strider on 11 Feb 2019
As always, my pleasure!

Sign in to comment.

More Answers (0)

Categories

Find more on Characters and Strings in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!