Reading data with Strcat and alternative
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Francesco Milani
el 25 de Abr. de 2020
Respondida: Walter Roberson
el 25 de Abr. de 2020
variable = xlsread('data.xlsx','Sheet', strcat('B', i_cell, ':G', f_cell));
In the above example I undestand that I am reading a specific sheet of the excel file but I dont get what " strcat('B', i_cell, ':G', f_cell)); " actually does.
Is there another way of writing the above code in a more easy way, by using another function instead of strcat?
Thanks in advance!
0 comentarios
Respuesta aceptada
Walter Roberson
el 25 de Abr. de 2020
range = sprintf('B%d:G%d', start_row, end_row); %where start_row and end_row are numeric
variable = xlsread('Data.xlsx', 'Sheet', range);
However it is confusing that you have something that looks like a range as a sheet name.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Characters and Strings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!