Questions tagged as 'matlab'

1
answer

Replace NaN in a matrix

I have this information Mat=[1 2 3 5;6 7 -9999 9;10 11 12 13;14 -9999 16 17;18 19 -9999 -9999] Mat(Mat<0)=NaN Mat = 1 2 3 5 6 7 NaN 9 10 11 12 13 14 NaN 16 17 18 19 NaN NaN How could you rep...
asked by 06.10.2016 / 22:12
1
answer

How to create a variable that cataloges in two groups the values that another variable takes in MATLAB

I have a variable "variant" that takes the following values: 1, 2, 3, 4, 5 and 6. What I need to do, is a new variable called amistad that takes value 1 for the cases in which the variante takes value 1, 3, 5 and that takes valu...
asked by 11.06.2016 / 22:19
1
answer

Derivatives in matlab

To do an integral in matlab we can execute the following: syms variable int(funcion,variable,a,b) can a derivative be made in the same way in a symbolic way?     
asked by 03.06.2017 / 11:05
1
answer

How to program a summation of two variables in matlab

Basically I'm trying to program for the function, which is then added random noise: When M takes values of 5, 10 and 15. What I have tried is: clear all n = 0:0.16:20; k = 0; X = cos((5*pi/4)*(n-k)) + sin(2*pi*(n-k) + pi/...
asked by 06.03.2017 / 08:47
1
answer

Save MATLAB function graph through Visual Studio?

Hello, is there any way to save a graphic that is in MATLAB, save it in a specific path through Visual Studio? Try doing it if: PictureBox1.Load(Matlab.Execute("ezplot('x^2',[-2,2]) ")) But the MATLAB window skips but it is shown in the...
asked by 03.05.2016 / 16:33
1
answer

combine matrices of images in which different matlab filter was used

I had a problem with an image, in the binarization when increasing the threshold one zone gained definition while another gained noise and so on; so I separated what needs bigger threshold like this: I=imread('img.jpg') I2=imcrop(I;[coordena...
asked by 19.10.2016 / 00:18
0
answers

Graph 2 3D figures in Matlab at the time

Hello! I have a problem. I have made 2 3D graphics in Matlab. The first is an ellipsoid: syms x y z [x,y]=meshgrid([-5:0.05:5],[-5:0.05:5]); z1=(sqrt(-9*x.^2-y.^2+9)) z2=(-sqrt(-9*x.^2-y.^2+9)) plot3(x,y,z1,x,y,z2) zlim([-4 1.5]) And the se...
asked by 07.04.2017 / 04:01
0
answers

MacKay Neal Algorithm - Stuffing a matrix with ones and zeros

I need to fill in a matrix with ones and zeros. The parameters that are provided are its dimension (N columns and k = N * (1-r) rows) and two vectors h and v that represent the distribution of rows and columns, respectively. For example, suppose...
asked by 16.03.2017 / 12:30
0
answers

Use pca in hyperspectral images with the toolbox Laurens van der Maaten in matlab

Someone could help me understand how I can use the pca of Laurens van der Maaten in matlab. The toolbox is in link I have the toolbox installed in matlab I have the hyperspectral image indian Pines leida but how to use PCA for me to be able...
asked by 26.02.2017 / 21:51
1
answer

Obtain variable value indirectly in Matlab

I have the name of n variables stored in a struct "list", and I would like to show the value of the variables by means of the position of the struct, that is: var_1=3 lista{1}='var_1' so that by entering lista{1} you print 3...
asked by 20.01.2017 / 01:18