Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Store character in a array possible?

1 visualizzazione (ultimi 30 giorni)
JOJO
JOJO il 17 Gen 2014
Chiuso: MATLAB Answer Bot il 20 Ago 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

Risposte (1)

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

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by