Category "matlab"

How to export matlab matrix to .txt in a format supported by c

As I state in the title, I want to export a matrix from matlab to a .txt file in format that is supported by C. What I mean is something like this { { 1, 2, 3,

Implementation of Matlab matrix inverse function in C++ with Eigen

So I need to re-write matrix right-handed division from Matlab to C++: At = (xPow*yPow')/(yPow*yPow'); I mocked some matrices: >> xPow*yPow' ans =

Neighboring gray-level dependence matrix (NGLDM) in MATLAB

I would like to calculate a couple of texture features (namely: small/ large number emphasis, number non-uniformity, second moment and entropy). Those can be co

Recorded signal file with .sig extension and plotting the signal

I have a recorded signal file that contains a vector of values containing samples in the form of real and imaginary parts. I need to plot this signal in matlab.

MATLAB Subplot Make Figure Larger

I am plotting two maps next to each other using subplot. However, now, the image is turning out like this: Is there any way to make the map part of the image

Does NumPy have a function equivalent to Matlab's buffer?

I see there is an array_split and split methods but these are not very handy when you have to split an array of length which is not integer multiple of the chun

Ideal dimensions for MATLAB figures on publications

I am asking a short question because I would like to have some opinions on the ideal dimensions that you require/use for a MATLAB figure in a publication. I am

Weighted Lucas Kanade - Gaussian Function MATLAB

I implemented the Basic Lucas Kanade Optical Flow algorithm in Matlab. I used the algorithm from Wikipedia. Since I want to improve this Basic optical flow alg

Is there any Difference of Gaussians function in Matlab?

I am new to Image Processing, and in my experiment I am having difficulty with Difference of Gaussians. Various implementation were given to me but I don't unde

reading v 7.3 mat file in python

I am trying to read a matlab file with the following code import scipy.io mat = scipy.io.loadmat('test.mat') and it gives me the following error raise NotIm

How to run Python from MATLAB

I'm trying to run Python from MATLAB, but when I try I got the message: py.list({'Monday','Tuesday','Wednesday','Thursday','Friday'}) Unable to resolve the na

Armadillo porting imagesc to save image bitmap from matrix

I have this matlab code to display image object after do super spectrogram (stft, couple plca...) t = z2 *stft_options.hop/stft_options.sr; f = stft_options.

Performane issue for matlab-like reshape in OpenCV

I am translating a Matlab code to OpenCV. The Code Involves lots of reshaping of large Matrices. As the matlab reshape differs from OpenCV you can't just use Op

When does assignment by reference occur in MATLAB?

This is a question about the MATLAB language. I am going through the MathWorks "Onramp" tutorial, and I have noticed a strange "assignment by reference" behavio

How can I find inflection points of a data set?

My codes finds inflection points and locations of them, but some points are missing. Is there any way to find correct points on MATLAB? My data set is at the li

3D histogram with gnuplot or octave

I would like to draw a 3D histogram (with gnuplot or octave) in order to represent my data. lets say that I have a data file in the following form: 2 3 4 8

Legend on MATLAB plot where every point is scattered individually

I am trying to get a legend on a scatter plot in Matlab, the problem is the way I plot the graph involves scattering each point (of which there are >10,000)

Matlab stops interpolating colors on a mesh correctly if it is larger than 120 triangles

I'm trying to draw a large mesh in Matlab using the trimesh function, with the z coordinate of the vertices controlling the color. Unfortunately, Matlab stops i

For loop to average over individual time points Matlab

I have a 21x2 vector in Matlab that looks like this: A = [0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5; 0 0 0

Is there a Python equivalent of MATLAB's conv2 function?

Does Python or any of its modules have an equivalent of MATLAB's conv2 function? More specifically, I'm interested in something that does the same computation a