Matlab. User input matrix to a string -
prompt = 'enter ascii codes'; dlg_title = 'input'; num_lines = 5; defaultans = {''}; answer = inputdlg(prompt,dlg_title,num_lines,defaultans); answer = answer{1}; m2=matrixa.'; result=char(m2(:)).'; result
what im trying write script when run it, convert matrix of numbers input sentence. doing wrong?
your input matrix string, not numeric. change line 7 to:
answer = str2num(answer{1});
but since never assign matrixa
, might change this:
matrixa = str2num(answer{1});
Comments
Post a Comment