small problem, how i can insert srting in matix ??
Afficher commentaires plus anciens
how i can insert string in matrix ??
I want to do this program :
-----------------------------
%comment section
%input section
n = input('=');
%calcultion section
s1 = zeros(3,n);
for m=1:n
q = input('sub= ','s');
d = input('hour = ');
w = input('degree =');
s1(1,m) = q ;
s1(2,m) = d ;
s1(3,m) = w ;
end
disp (s1)
------------------------
I have problem in "" s1(1,m) = q ; "" because q is input for string
hou i can fix this problem ??
thinks a lot
Réponse acceptée
Catégories
En savoir plus sur Numeric Types dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!