Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Store character in a array possible?

1 visualización (últimos 30 días)
JOJO
JOJO el 17 de En. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I want to store the name of the character the user type so I can use it for a future function [t,fs]= wavread(file);
however I get this error: In an assignment A(:) = B, the number of elements in A and B must be the same.
CODE:
for i=10
i=i+1
name = input ('Enter the name of the voice command:','s');
file(i) = sprintf('%s.wav',name);
end

Respuestas (1)

Walter Roberson
Walter Roberson el 17 de En. de 2014
file{i} = sprintf('%s.wav',name);
Notice the (i) changed to {i}

La pregunta está cerrada.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by