|
|
Conversion to double from cell is not possible.
Hya
I create two things(hum I don't know how to call them!! may be cells !!) like this
a = zeros(100,100)
b = cell(100)
and when I try to fill the first table doing for exemple
a(1,5) = b(5,4)
I have this error message : ??? Conversion to double from cell is not possible.
Can anyone help me please !!!!
Thank you
|
|
0
|
|
|
|
Reply
|
Giga
|
5/3/2010 2:14:05 PM |
|
"Giga Babs" <bdmendy@gmail.com> wrote in message
news:hrmlnd$p7m$1@fred.mathworks.com...
> Hya
> I create two things(hum I don't know how to call them!! may be cells !!)
> like this
> a = zeros(100,100)
> b = cell(100)
a is a numeric matrix; b is a cell array. If you want one term to cover
them both, variables would do.
> and when I try to fill the first table doing for exemple
>
> a(1,5) = b(5,4)
>
> I have this error message : ??? Conversion to double from cell is not
> possible.
>
> Can anyone help me please !!!!
If you want to put the _contents_ of the cell in row 5, column 4 of the cell
array b into the element in row 1, column 5 of a then you need to use curly
brace indexing on your cell array:
a(1, 5) = b{5, 4}
When used for indexing, parentheses generally return a variable of the same
class as the variable into which you're indexing. Curly braces, when used
for cell arrays, returns the contents of a cell or cells, not the cell or
cells themselves.
--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|
|
0
|
|
|
|
Reply
|
Steven
|
5/3/2010 3:03:20 PM
|
|
"Giga Babs" <bdmendy@gmail.com> wrote in message <hrmlnd$p7m$1@fred.mathworks.com>...
> Hya
> I create two things(hum I don't know how to call them!! may be cells !!) like this
> a = zeros(100,100)
> b = cell(100)
>
> and when I try to fill the first table doing for exemple
>
> a(1,5) = b(5,4)
>
> I have this error message : ??? Conversion to double from cell is not possible.
>
> Can anyone help me please !!!!
>
> Thank you
this does not work they way you show it
% correct syntax
a(1,5)=b{5,4};
% BUT: since B is an empty CELL array - according to your snippet -
% it will still throw an error because
a(1,5)=[]
% is wrong... and yields a
% ??? Subscripted assignment dimension mismatch.
us
|
|
0
|
|
|
|
Reply
|
us
|
5/3/2010 3:14:24 PM
|
|
|
2 Replies
1235 Views
(page loaded in 0.098 seconds)
Similiar Articles: Conversion to double from cell is not possible. - comp.soft-sys ...Re: Conversion to cell from char is not possible. - Help? - comp ... converting double to long - comp.lang.c Re: Conversion to cell from char is not possible. Very weird: Conversion to double from struct is not possible ...MATLAB to C conversion - comp.soft-sys.matlab... with C standard "time_t" data structure ... Matlab isn't C or C++ so ... Conversion to double from cell is not possible. ... ??? Error using ==> plot Conversion to double from sym is not ...MATLAB to C conversion - comp.soft-sys.matlab Conversion to double from cell is not possible. Convert char to double - comp.soft-sys.matlab Hi I have a cell with data that ... Re: Conversion to cell from char is not possible. - Help? - comp ...Double to char - comp.soft-sys.matlab Re: Conversion to cell from char is not possible. - Help? - comp ... Convert char to double - comp.soft-sys.matlab Re: Conversion to ... Previously accessible file "C:\Program Files\MATLAB71\toolbox ...Error using ==> double Conversion to double from cell is not possible." Is this problem familiar to someone or does anyone know how to get rid of it? Convert Cell array to a double array - comp.soft-sys.matlab ...Conversion to cell from double is not possible - Error - comp.soft ... You could just be lazy and let MATLAB handle your array sizing: t=0:0.05:5; a=0:0.5:2; Y = []; for i ... converting double to long - comp.lang.c- Help? - comp ... converting double to long - comp.lang.c Re: Conversion to cell from char is not possible. - Help? - comp ... Conversion to double from cell is not ... Matrix,Cell and Sequence conversions - comp.soft-sys.matlab ...Conversion to double from cell is not possible. - comp.soft-sys ... b = cell ... fill this data into a structure file or in a matrix, so that i ... Double to char - comp.soft-sys.matlabConversion to double from cell is not possible. - comp.soft-sys ... Convert char to double - comp.soft-sys.matlab Re: Conversion to cell from char is not possible. Converting Certain Data from Numeric Matrix to Text - comp.soft ...Conversion to double from cell is not possible. - comp.soft-sys ..... zeros(100,100) > b = cell(100) a is a numeric matrix; b is ... comp.soft-sys.matlab To do this, i ... Conversion to double from cell is not possible. - Newsreader ...File exchange, MATLAB Answers, newsgroup access, Links, and Blogs for the MATLAB & Simulink user community Conversion to cell from double is not possible ... - Newsreader ...File exchange, MATLAB Answers, newsgroup access, Links, and Blogs for the MATLAB & Simulink user community 7/23/2012 12:21:40 AM
|
|
|
|
|
|
|
|
|