Help to print cell array in command window
Afficher commentaires plus anciens
maximos = {[] mx [] mxBrake mxLong mxLat mxfcomb mxvCar};
minimos = {[] mn [] [] [] [] [] mnvCar};
media = {[] md [] [] mdLong mdLat mdfcomb mdvCar};
Coord_maximo = {[] [EngNLat EngNLong] [] [BrakNLat BrakNLong] [gLongNLat gLongNLong] [gLatNLat gLatNLong] [fcombNLat fcombNLong] [mx_vCarNLat mx_vCarNLong]};
Coord_minimo = {[] [] [] [] [] [] [] [mn_vCarNLat mn_vCarNLong]};
Percent_uti = {perNGear [] percrThr [] [] [] [] []};
estatisticas = [maximos; minimos; media; Coord_maximo; Coord_minimo; Percent_uti];
for i=1:8
Statistics(i).maximos= maximos{1,i};
Statistics(i).minimos= minimos{1,i};
Statistics(i).media= media{1,i};
Statistics(i).Coord_maximo= Coord_maximo{1,i};
Statistics(i).Coord_minimo= Coord_minimo{1,i};
Statistics(i).Percent_uti= Percent_uti{1,i};
end
for i = 1:length(Statistics)
fprintf('%10.2f%10.2f%20.2f%22f%20f%8.2f\n',Statistics(i).maximos, Statistics(i).minimos, Statistics(i).media, Statistics(i).Coord_maximo, Statistics(i).Coord_minimo, Statistics(i).Percent_uti);
end
It appear:
12.63
18.69 17.93 16.16 21.464646 13.131313 0.00
17958.00 9163.00 15373.41 -37.839480 144.964200
50.51
88.00 -37.851920 144.978270
2.00 -0.03 -37.853710 144.977070
3.00 0.30 -37.840180 144.963670
4.00 1.66 -37.838520 144.966800
296.60 79.20 202.68 -37.849000 144.967560 -37.84
144.96>>
The problem is when appear the parts of the array with two element. this unconfigures the text.
Thanks
Réponse acceptée
Plus de réponses (1)
5mid
le 7 Déc 2013
0 votes
1 commentaire
Michael O'Brien
le 19 Juin 2022
Can you explain how you solved it?
Catégories
En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!