handling multiple lines of input from inputdlg

  • Follow


I'm trying to troubleshoot a problem with a GUIDE edit text box and running into the same issues with inputdlg. 

Here's the very simple code I'm running to test it:

prompt={'Test'};
name = 'test';
numlines=2;
defaultanswer={'test'};
answer=inputdlg(prompt,name,numlines,defaultanswer);

When I put a second line under the default answer, for example the string 'second', I get a single cell of output, formatted as a string, reading:
tseescto n d

However, selecting answer{1,1} gives me:
ans = 
test
second

I can't figure out how to handle this output.  Attempting to view it as an array doesn't work, neither does strread.
0
Reply Shauna 1/18/2011 9:05:05 PM

>> answer{1}(1,:)
ans =
test  
>> answer{1}(2,:)
ans =
second
>> 
0
Reply Matt 1/18/2011 10:10:22 PM


1 Replies
581 Views

(page loaded in 0.126 seconds)

Similiar Articles:













7/23/2012 12:23:48 PM


Reply: