small problem, how i can insert srting in matix ??
Show older comments
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
Accepted Answer
Categories
Find more on Numeric Types in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!