Questions tagged [matlab]

MATLAB is a high-level language and interactive programming environment for numerical computation and visualization developed by MathWorks. Questions should be tagged with either [matlab] or [octave], but not both, unless the question explicitly involves both packages. When using this tag, please ...

I have a simple function of theta and I want to plot this function in dB using the polarplot function in MATLAB. But when I make the graph from -40 to 0, the graph seems to have a strange part around ...

I need a (rho,theta) meshgrid and to do that first I defined the meshgrid in Cartesian coordinates and then convert it to polar coordinates:
[X,Y] = meshgrid(x,y);
R = sqrt(X.^2+Y.^2);
PHI = atan2(Y,...

This is probably and easy matlab question but I am really struggling with this one:
I am building a for loop to go through a directory of folders and open a file (filename.csv) within each uniquely ...

I have vertecies x y and faces and I have a segmented image georeferenced.
How can I know if the faces belong to the segmented image georeferenced or to make it simple how to know if my faces belong ...

After installing R2018b, the first figure I opened contained an interesting message (shown in blue):
The reason it's interesting is because it contains features like text wrapping, transparency, the ...

How to get an average of every 10 numbers in a big matrix (27x16800).
I can't find the solution
If anyone could help that would be great.
UPD Sorry, I should have been more clear. I have a matrix of ...

I have 1D vector. For example: y=[0.2 0.9 1.0 1.0]. I can plot it with plot(y) to get a graph of y(x) where x values are just indices [1, 2, 3, 4].
Now, instead of x values being just indices, I want ...

I have been playing around with parallelization both using CUDA and OpenMP in Fortran. I am now trying to do the same in matlab. I find it very interesting that it seems to be very hard to paralelize ...

I'd like to calculate the Euclidean distance between a vector G and each row of an array C, while dividing each row by a value in a vector GSD. What I've done seems very inefficient. What's my biggest ...

I have two images and would like to perform feature detection on both and match these features. My problem is that the second image is a section of the first image with missing pixels. These missing ...

I'm using ode15s to simulate/solve a set of ODEs. I would like to implement a feature, where upon reaching a given condition during the simulation, a number in the model changes programatically (e.g., ...

Please can you help me correcting this code? I want to save the result of the Fast Fourier Transform of each image apart so I can reuse the proper coefficients for every band of wave I get from the ...

In MATLAB, a class folder is represented by foo/@bar/ and a package folder is represented by foo/+bar. In my hierarchy, I have classes that define methods in separate files, so the @bar/ convention is ...

I'm getting this error :
No add-on library uploaded to the board. Please clear and recreate the current Arduino object to include appropriate library.
I'm programming an ultrasonic sensor HC-SR04 to ...

I'm trying to implement the following in MATLAB but I'm having some trouble with the internal summation
I have a full vector of x. I was thinking of maybe using conv() but not sure how I would change ...

I have implemented the naive version of non local means without integral images.
First image acquisition:
row = 10;
col = 10;
% Patchsize - make sure if code works for different values
patchSize = 4;...

For example, I got 3 pairs of 1-D loglog curves and additionally their associated cartesian coordinate points (x,y,z) of one of their ends A, B and C over a mesh surface S (z is positive downwards and ...

I am learning MATLAB and was trying to code the following.
Write a function called “buildrandomstrings” that will receive as input an integer n.Now If n is +ve: it will create and return a cell array ...

I am supposed to write a script that provides multiple lines of projectile motion but my code doesn't seem to give me what I need.
disp('This program will calculate the trajectory of a ball thrown at ...