Prev: n-D lookup table / interpolation simulink 3.0 (R11)
Next: Studying the attention of a person in face of a webcam
From: us on 14 Jul 2010 11:53 "aamir zeb" <addikted(a)gmail.com> wrote in message <i1klpu$dd7$1(a)fred.mathworks.com>... > "us " <us(a)neurol.unizh.ch> wrote in message <i1k4g8$itq$1(a)fred.mathworks.com>... > > "aamir zeb" <addikted(a)gmail.com> wrote in message <i1k3k5$n5k$1(a)fred.mathworks.com>... > > > "us " <us(a)neurol.unizh.ch> wrote in message <i1k0pc$k6r$1(a)fred.mathworks.com>... > > > > "aamir zeb" <addikted(a)gmail.com> wrote in message <i1k0c9$nik$1(a)fred.mathworks.com>... > > > > > Please can anyone tell whats the command for making the program to take data at runtime? > > > > > > > > a hint: > > > > > > > > help input; > > > > help inputdlg; > > > > > > > > us > > > > > > i wrote > > > prompt={'Enter the PATTERN'}; > > > Pattern=INPUTDLG(prompt); > > > some function > > > > > > it gives error > > > > > > Conversion to double from cell is not possible. > > > > > > can anyone help > > > Regards > > > > well... > > the section > > > > prompt={'Enter the PATTERN'}; > > Pattern=inputdlg(prompt); % <- note: NO caps(!)... > > % is working fine and is what you asked for in your OP... > > > > everything else is due to problems in your subsequent code, which you don't show... > > a hint: > > - just make sure you understand what PATTERN returns(!)... > > > > us > let me give an example > Pattern =['hello'] > please tell tell(?)... well(!)... your PATTERN is a CELLSTR... cs={'hello'} % cs = 'hello' % <- a CELL... s=cs{1} % s = hello % <- a CHAR array... us
From: Andy on 14 Jul 2010 11:54 > let me give an example > Pattern =['hello'] > please tell It is unlikely that Pattern = ['hello'], since inputdlg returns a cell array. Judging from your error message, something in your subsequent code tries to read the Pattern as a double and gets confused because it is, in fact, a cell array.
From: aamir zeb on 14 Jul 2010 12:12 "Andy " <myfakeemailaddress(a)gmail.com> wrote in message <i1kmis$54d$1(a)fred.mathworks.com>... > > let me give an example > > Pattern =['hello'] > > please tell > > It is unlikely that Pattern = ['hello'], since inputdlg returns a cell array. Judging from your error message, something in your subsequent code tries to read the Pattern as a double and gets confused because it is, in fact, a cell array If i enter. Pattern =['hello'] without using the dialogue option it works.i just want that instead of entering pattern data in the program i should enter at run time
From: us on 14 Jul 2010 12:24
"aamir zeb" <addikted(a)gmail.com> wrote in message <i1knkm$eq3$1(a)fred.mathworks.com>... > "Andy " <myfakeemailaddress(a)gmail.com> wrote in message <i1kmis$54d$1(a)fred.mathworks.com>... > > > let me give an example > > > Pattern =['hello'] > > > please tell > > > > It is unlikely that Pattern = ['hello'], since inputdlg returns a cell array. Judging from your error message, something in your subsequent code tries to read the Pattern as a double and gets confused because it is, in fact, a cell array > > If i enter. Pattern =['hello'] without using the dialogue option it works well... of course... did you read what i told you... us |