Converting a 2D matrix into a 3D matrix in matlab [closed] - matlab

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 days ago.
Improve this question
My problem is to convert my 294912x39 2d matrix into a 3D matrix 128X128X18
Using the reshape function in matlab I get errors.So, my idea is to convert it manually. My 2d matrix is 294912x39 and the 3D matrix I need is 128x128x18. Anyone could you help me?

Related

how do I enter the coordinates of a point in matlab? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 months ago.
Improve this question
I wan to give x,y,z coordinates to a point, for example to P point.
The P point coordinates are: P=(0,1,1)
How can I give the values in Matlab?
I tried P=(0,1,1) and Px=0 Py=0 Pz=0 ,but I need it to an equation.
one variable can store n-dimensional coordinates
P=[0 1 1];
you can also do this:
px=0;
py=1;
pz=1;

How do you convert a .PNG image to a matrix of values using MATLAB? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Is it possible to convert a .PNG image to an array of numerical values (e.g. red, green, blue values) that I can work with using MATLAB? If so, how can I do this?
not sure what you mean.
if you import imread('someImage.png') you get a n x m x 3matrix

how to convert the temperature from kelvin to Celsius? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have a matrix 180*360*120.
120 is time series of temperature in kelvin. now I want to convert this temperature from kelvin to Celsius. kindly suggest me a Matlab code for this conversion.
So what I understand is that you have a matrix A of dimensions 180*360*120 i.e. having 7776000 elements of kelvin temperatures. These Kelvin you want in Celsius. Can you not simply have the following code to get the result?
B=A-273.15
where B is your matrix with temperatures in Celsius

Matrix Scale down using MATLAB [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have 254 * 128 integers and I need to scale down to 45 * 22,5 .
Could you please help me if I could perform with MATLAB.
Thanks
Baskar
You cannot have non-integer sized matrices. 22,5 is not a valid dimension of a matrix.
If you are talking about images you can resize the matrix in Matlab using imresize.
.
A = rand(254, 128);
A = imresize(A, [45, 23]);

How can I make aperture function (telescope's aperture) in Matlab? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Can anyone help me to make aperture function in Matlab? I tried by making a matrix, but it wasn't helpful.
If you have the image processing toolbox you can use fspecial:
A = fspecial('disk',10);
This will create an aperture of radius 10 pixels.
Next, you can embed this matrix in a bigger zero matrix, using padarray, for example:
A = padarray(A,[20 20]);