How can I manage with this numbers?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Francesco
il 22 Feb 2014
Commentato: Dishant Arora
il 22 Feb 2014
I have a A=1x56 double variable.
A =
Columns 1 through 9
0.0127 0.0358 0.2141 0.2279 0.2737 0.0003 0.0282 0.0196 0.0307
Columns 10 through 18
0.2148 0.1049 0.1963 0.1725 0.0442 0.0279 0.0485 0.0659 0.0735
Columns 19 through 27
0.0285 0.0593 0.0568 0.1611 0.0540 0.4560 0.3430 0.2006 0.0439
Columns 28 through 36
0.1192 0.1400 0.0719 0.1776 1.6570 0.5565 0.6836 0.1456 0.0308
Columns 37 through 45
0.7118 0.3418 0.4893 0.3433 0.0241 0.2332 0.1560 0.0538 0.5159
Columns 46 through 54
0.0075 0.0640 0.0411 0.0219 0.0245 0.0294 1.1100 0.1268 0.2686
Columns 55 through 56
0.0543 0.0266
But In general I work with 1xn double variable. After this I have
col_A=rc1(1,2)-2;
But col_A it's simple a number: 7 for example in this case. I have to create a matrix that is an made up by 7 columns and 8 rows, in this case because the number of columns depends of the col_A value and The number of rows depends is n/col_A value. How Can I do this?
2 Commenti
Risposta accettata
Dishant Arora
il 22 Feb 2014
Modificato: Dishant Arora
il 22 Feb 2014
what's rc1?? anways try this:
row_A = n/col_A;
reshape(A, row_A, [] );
4 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!