|
Hello!
I am not sure how to rescale a 3-D matrix. How do I do this?
At the moment the limits of the Y dimension are given by 1 to 101.
I need to rescale the values of this dimension into limits of 1 and 1.1.
Thus starting with the second value of Y, I have to divide each element by 1000.
The limits of the X dimension are currently given by 1 and 28.
I need to rescale them into limits of 3 and 30. Thus I have to add 2 to every element of X.
Given the 3-D array Right_matrix(x,y,z), how do I do this in Matlab?
I would be really glad for your help.
Thanks
Julie
"Wolfgang Schwanghart" <schwanghartremove.this@googlemail.com> wrote in message <hdrgto$rqv$1@fred.mathworks.com>...
> Just create some copies of your variables and rescale them. It is far easier than changing tick labels. If you insist on changing tick labels, than look at the help section for axis properties, Xticklabel.
>
> Best regards, W.
>
> "JULIE " <julie.kratz.09@ucl.ac.uk> wrote in message <hdrgb0$mdl$1@fred.mathworks.com>...
> > "Wolfgang Schwanghart" <schwanghartremove.this@googlemail.com> wrote in message <hdr7rj$hfn$1@fred.mathworks.com>...
> > > Julie,
> > >
> > > why don't you just rescale your data to the desired data limits and then plot it? How will plot3 work with only one input argument being a two by two matrix?
> > >
> > > >> plot3(rand(2))
> > > ??? Error using ==> plot3
> > > Not enough input arguments.
> > >
> > > Best regards, W.
> > >
> > >
> > > "JULIE " <julie.kratz.09@ucl.ac.uk> wrote in message <hdr4aj$ku8$1@fred.mathworks.com>...
> > > > Dear All!
> > > >
> > > > I have a 3-D Plot: plot3(T), with being a 2*2 matrix
> > > > and I need to display the Ticks of all axes.
> >
> > Hello!
> >
> > The matrix I have is a 2*2 matrix, but there are several variations for the two dimensions. Y1, ...,Yn; X1,...,Xp; with X being nested.
> > I can not use the rescale, as the data is exactly as I want it to be. It is just that I need to change the X and Y Ticks without changing the Data. I had to use X and Y in this format within the program as I am using the variations for X and Y to index several matrices. Do you know how I could overwrite the values for the X and Y Ticks without changing the data?
> >
> > Thanks
> >
> > julie
> > > >
> > > >
> > > > The Y-axis ranges from 1 to 100 and the Z-axis from 1 to 21.
> > > >
> > > >
> > > > For the X-Axis I do not want Matlab to display the numbers 1 to 100, increasing at 1.
> > > > I want Matlab to display the numbers 1 to 1.1, increasing at .001.
> > > > Thus I want to overwrite the existing Y-Ticks. I do NOT want to rescale the axis OR to simply display the interval 1 to 1.1. from the existing axis.
> > > >
> > > > For the Z-Axis I do not want Matlab to display the numbers 1 to 21.
> > > > I want Matlab to display the numbers 3 to 24. AGAIN I want to overwrite the existing Ticks.
> > > >
> > > > How can I do this????? I would be glad to figure this out, even if I have to change each single Tick manually via the Plot editor.
> > > >
> > > > I am glad to hear back from you.
> > > > Thanks
> > > >
> > > > Julie
|