Creatin a matrix within values from a biger matrix
Mostrar comentarios más antiguos
I have a matrix 500000x117. I need to populate a matrix 7x116 with values from the bigger matrix (1:7,2:117)
3 comentarios
dpb
el 5 de Mzo. de 2021
So, what have you tried and where did you have problems?
Camilo Jurado Paez
el 5 de Mzo. de 2021
Editada: dpb
el 5 de Mzo. de 2021
dpb
el 5 de Mzo. de 2021
Well, we'd have to see the form of the data in the spreadsheet and the error message but readmatrix doesn't return a cell arry; it returns a double array already -- any data in the spreadsheet that can't be interpreted as a valid floating point number will be returned as NaN.
m=readmatrix("C:\Users\Camilo\Desktop\data_raw_sample.xlsx");
m1=m(1:7,2:117);
will return the content of whatever is in the spreadsheet that is numberic in that region of the overall array; as noted, if some of the content of the file is non-numeric, those will be returned as NaN--but still in a double array.
Respuestas (1)
Prudhvi Peddagoni
el 8 de Mzo. de 2021
0 votos
Hi,
you can use import tool to import data from the spreadsheets. You can check if there are any NaN values too.
Hope this helps.
Categorías
Más información sobre Spreadsheets en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!