using strcat with num2str
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I'm new to Matlab and I wanna know what does the below command or function means.
filename = strcat(filename(1:(105-15)),num2str(i),'130')
0 comentarios
Respuestas (2)
Walter Roberson
el 30 de Ag. de 2016
You have
filename='C:\X\fort.130';
filename = strcat(filename(1:(105-15)),num2str(i),'130');
The first of those lines makes filename a string of 13 characters. The second of those lines tries to access the first 90 of those 13 characters.
Please have a look at
0 comentarios
KSSV
el 29 de Ag. de 2016
strcat - Concatenates strings in your code the strings are ...first 90 characters from the string filename, character i and number character 130.
num2str : converts number to string/ character.
2 comentarios
kareem salloomi
el 30 de Ag. de 2016
Editada: Walter Roberson
el 30 de Ag. de 2016
James Tursa
el 30 de Ag. de 2016
What does this print:
numel(filename)
Maybe filename doesn't have 105 characters.
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!