small problem, how i can insert srting in matix ??
이전 댓글 표시
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
채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Numeric Types에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!