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

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -