From: Priya on
"us " <us(a)neurol.unizh.ch> wrote in message <hjuroi$nus$1(a)fred.mathworks.com>...
> "Priya " <priya.biomath(a)gmail.com> wrote in message <hjuq43$6i2$1(a)fred.mathworks.com>...
> > "us " <us(a)neurol.unizh.ch> wrote in message <hjupos$da6$1(a)fred.mathworks.com>...
> > > "Priya "
> > > > I have 3d problem
> > > this thread is useless unless you tell CSSMers the result of
> > > whos concentration;
> > huuh !!
>
> well, instead of producing a useless interjection, you should have show the result of
>
> whos concentration;
> % and
> disp([nx,ny,nz]);
>
> us
after your suggestion this is the error.
??? Error using ==> horzcat
CAT arguments dimensions are not consistent.

Listen I am not expert, This is my second week with Matlab.
From: us on
"Priya " <priya.biomath(a)gmail.com> wrote in message <hjusmk$pk4$1(a)fred.mathworks.com>...
> "us " <us(a)neurol.unizh.ch> wrote in message <hjuroi$nus$1(a)fred.mathworks.com>...
> > "Priya " <priya.biomath(a)gmail.com> wrote in message <hjuq43$6i2$1(a)fred.mathworks.com>...
> > > "us " <us(a)neurol.unizh.ch> wrote in message <hjupos$da6$1(a)fred.mathworks.com>...
> > > > "Priya "
> > > > > I have 3d problem
> > > > this thread is useless unless you tell CSSMers the result of
> > > > whos concentration;
> > > huuh !!
> >
> > well, instead of producing a useless interjection, you should have show the result of
> >
> > whos concentration;
> > % and
> > disp([nx,ny,nz]);
> >
> > us
> after your suggestion this is the error.
> ??? Error using ==> horzcat
> CAT arguments dimensions are not consistent.
>
> Listen I am not expert, This is my second week with Matlab.

gee, again...

% WHAT is the result of
whos concentration;
% then, as there's apparently a misunderstanding of how RESHAPE works
whos nx ny nz;

just copy/paste these lines into your command window...
us
From: Steven Lord on

"Priya " <priya.biomath(a)gmail.com> wrote in message
news:hjup80$8oe$1(a)fred.mathworks.com...
> "Steven Lord" <slord(a)mathworks.com> wrote in message
> <hjuoup$jm5$1(a)fred.mathworks.com>...
>>
>> "Priya " <priya.biomath(a)gmail.com> wrote in message
>> news:hjundt$a4t$1(a)fred.mathworks.com...
>> > Can anybody tell me what is wrong in this line
>> >
>> > (concentration,nx,ny,nz)));
>>
>> You have one left parenthesis and three right parentheses.
>>
>> Note: please don't ask half your question in the subject line of the
>> post and the other half in the body. It's okay (and even recommended)
>> for the subject to contain a 'teaser', but even if you do that you should
>> put the entire question in the body.
>>
>> So assuming your question was "Can anybody tell me what is wrong in this
>> line
>>
>> imagesc(flipud(reshape(concentration, nx, ny, nz)));"
>>
>> the error message you should have received should have made it clear
>> what's wrong in the line of code you posted above (assuming nz is not
>> equal to 1.)
>>
>> Use FLIPDIM instead of FLIPUD, and make sure that the reshaped, flipped
>> concentration array is in a format IMAGESC recognizes (which I believe
>> means nz must be either 1 or 3.)
>>
>> --
>> Steve Lord
>> slord(a)mathworks.com
>> comp.soft-sys.matlab (CSSM) FAQ:
>> http://matlabwiki.mathworks.com/MATLAB_FAQ
>
> Sorry for my mistake.
>
> imagesc(flipdim(reshape(concentration, nx, ny, nz)))
>
> I use flipdim and now the error says
>
> ??? Error using ==> flipdim at 21
> Requires two arguments.

That is correct. If you look at "help flipdim" you will not see any
examples of a 1-input syntax for that function. FLIPDIM requires exactly
two inputs -- otherwise how would it know which dimension to flip or the
array whose dimensions it should flip?

When using a function that's new to you or one that you're not _entirely_
sure how to use, I strongly recommend reading through the function help
(using the HELP function) and/or the documentation (using the DOC function.)
Most of the functions include examples of their use in their help or
documentation, and you can use these examples to make sure you're using the
function correctly.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ