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]);
Related
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?
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;
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
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 want to use genetic algorithm in matlab. I have a matrix as a population.
how can I use a specific matrix as a population to input in ga function of Matlab?
use gaoptimset setting the 'InitialPopulation' field and pass the result to your ga as the options argument
example:
pop = {rand(n,m)} %// The {} might not be necessary.
options = gaoptimset('InitialPopulation',pop);
x = ga(....., options)
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]);