1 answer

Creating 2D Matrix from Vector

I currently have a vector called assignments (ex. [1, 1, 3, 2]) of size NUM_PATCHES. I want to create a 2D matrix feat_vecs of dimensions [NUM_CLUSTERS, NUM_PATCHES] such that the matrix looks like ...

1 answers | 3 mins ago by It's Magic on Stack Overflow stackoverflow.com
1 answer

Bandpass Filter for 4D image in Matlab

I have implemented in Matlab a bandpass filter for a 4D image (4D matrix). The first three dimensions are spatial dimensions, the last dimension is a temporal one. Here is the code: function ...

2 answers

Matlab : Find Peaks of Multiple curves in a single image

There are three curves in this image and I am not able to find the peaks of these three curves. How to go about finding the peaks? Or how to go about splitting this image into three separate curves ...

0 answers

matlab animation with multiple layers

I'm using contourf to generate a wave propagation animation. I'm coloring just one range in the matrix for each iteration of the for loop.I'm then animating the generating images as gif. When I add ...

0 answers

Matlab - Issue using poisolv with non-constant numerical Neumann Boundary Conditions

I want to solve Poisson's Equation on a rectangular domain using the poisolv function from the Partial Equation toolbox. The equation : Laplacian(u) = -f I have a f1 matrix that represents the ...

1 answer

Datenum function in Octave is slow. What can I do?

I'm trying to convert a character vector (200,000 rows) into Matlab serial numbers. The format is '01/07/2015 00:00:59'. This takes an incredibly long time, and online I can only find tips for solving ...

1 answers | 1 hour ago by BallzofFury on Stack Overflow stackoverflow.com
2 answers

MATLAB efficient histogram look up

I have a large 3-dimensional matrix (on the order of 1000x1000x100) containing values that correspond to a bins in normalized high-resolution histograms. There is one histogram for every index in the ...

2 answers

Find rows in matlab table

I'm new to Matlab, sorry for this very simple question. Given a table: >> T = table(['MALE';'MALE';'FEMA';'FEMA';'FEMA'],[38;43;38;40;49],[71;69;64;67;64],[176;163;131;133;119]) T = Var1 ...

2 answers | 1 hour ago by A. K. on Stack Overflow stackoverflow.com
0 answers

Building mex file (mexgdal) in Visual Studio or Matlab (same errors: LNK2001 unresolved external symbol)?

I am trying to compile mexgdal.c in visual studio 2013 and keep coming across the LNK2001 error for Gdal functions (like GDALOpen, GDALAllRegsiter, GDALGetRasterBand, etc.) I've tried the solutions ...

0 answers

Questions regarding reorganizing loops for code's efficiency

Here's the problem Consider the following function: function A = plodding(N,d) for ii = 1:N jj = 1; A(ii,jj) = randn; while abs(A(ii,jj)) < d jj = jj + 1; A(ii,jj) = randn; ...

0 answers

MATLAB linear separation of point sets

So I have a set of points V, which are the vertices of a convex polytope, and a separate point p. Basically, I want to check whether p is contained in V. To do so, I set up a linear program that ...

0 answers

Parallel computing in Linux - Efficiency

I'm trying to run a code with parfors in a Matlab in Linux. There are two problems. The computer that has Linux is much stronger than the one I have Windows. (12 much stronger cores on the Linux ...

1 answer

How do I run MATLAB scripts in parallel (i.e. on multiple cores and without using parfor)?

I am looking for options to run MATLAB scripts I have in parallel without too much hassle. Is there an example or a simple scenario on how to proceed in this case?

0 answers

Error when trying to use MEX function

I am trying to compile a MEX function on Matlab R2013a, Linux (Ubuntu 14.04) and when I run the system command, it returns the following message: gcc: error trying to exec 'cc1plus': execvp: Not a ...

0 answers

how to port parfor loops on GPU?? how can i make use of NVIDIA GFORCE card 2GB inbuild in my laptop

set(handles.txtOperation,'String','Creating NP List...'); pause(0.001); NP_List = zeros([kv size(covtype2,2)-1]); tic; parfor count=1:kv index = find(idx == count); NP_List(count,:) = ...

1 answer

Plotting histogram of a slice of a matrix

I have a matrix amp containing 10 row signals [1*1001]. So the total dimension of my data is [10*1001]. Each row is containing amplitude fluctuations(signal). Now by using plot(f,abs(amp)), I am ...

1 answer

MATLAB MEX-file builds successfully but nothing is displayed

I am new here so I will try to expose my issue clearly: I am currently developping a program in MATLAB language that has to load a library to work properly. However, the latter is written in C/C++ (I ...

0 answers

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 = ...

2 answers

Construct ternary grid, evaluate a function on the grid and contour plot in Matlab

I need to evaluate a function (say) Fxy = 2*x.^2 +3 *y.^2; on a ternary grid x-range (0 - 1), y-range (0-1) and 1-x-y (0 - 1). I am unable to construct the ternary grid on which I need to evaluate the ...

2 answers | 4 hours ago by jam_27 on Stack Overflow stackoverflow.com
1 answer

control a wpf from matlab by using a c# dll

i would like to know weather it is possible to control some wpf application written in c# by using a c# dll out of matlab. what i need is the possibility to start the MainWindow and i have to be able ...

1 answers | 5 hours ago by justSomeone on Stack Overflow stackoverflow.com
2 answers

Number of steps necessary in order to complete an algorithm

So guys, I've already asked a question about how to develop an algorithm here. The reviewed code looks like this: (note that I've put the elements in the vector L all equal in order to maximize the ...

2 answers | 5 hours ago by ale42 on Stack Overflow stackoverflow.com
2 answers

Does MATLAB have a strip function for strings?

Is there a simple function f such that f(' hello, world! ' ) == 'hello, world!' I can strip out the spaces (or any character for that matter) using regexes, but this seems like applying a hammer to ...

2 answers | 5 hours ago by Derek on Stack Overflow stackoverflow.com
1 answer

Using interp2 in Matlab with NaN inputs

I have some observational data that is relatively complete, but contains some NaN values, in an matrix in matlab and I want to interpolate them to a more evenly spaced grid using interp2 So, to keep ...

0 answers

Vectorization of block consecutive matrixes in a Matrix (M = [N(1);N(2);…;N(n)])

I want to vectorize the following code, but I do not know if this is possible (I added the code and an example set as links below). I have a [n,48] matrix with solutions called 'pop'. A solution 'x' ...

0 answers

Creating Bitmap image from array in Matlab

I have an array where each element is of 8 bit(ie 0-255) and I have the Height and Width of image I want to make in Img_height and Img_width. Now I want to create a grayscale Bitmap image out of it in ...

1 answer

Plot displays additional line that is not included in data

I would be glad if you help me. I wrote short MATLAB program that only displays measured values from a .csv file. It usually works, but with one dataset it draws one extra line for each data intput. ...

1 answers | 6 hours ago by Radek on Stack Overflow stackoverflow.com
2 answers

Fourier transform of multiple rows

I want to take FFT of 10 measurements. That means I have 10 rows in my data with each row having dimension [1*2000]. In the code below, I am doing in a wrong way. Can anybody tell me what mistake I am ...

0 answers

Matlab mex -setup' is unable to find the compiler/SDK installed on the computer

I have Matlab 2011a 32 bit installed on a Windows7 64 bit computer. I am getting the following error when trying to set up the default compiler: ****??? Error using ==> mex at 208 Unable to ...

1 answer

How to get the intersection volume of two meshes (faces & vertices)?

Do you know how to get the intersection (corresponding) volume/meshes of two polygon meshes consisting of the set of faces and vertices in Matlab?

1 answers | 7 hours ago by Joon An on Stack Overflow stackoverflow.com
1 answer

IDL fails due to wrong libfreetype.6.dylib version on MacOS when called from Matlab

This is another interesting version of a libfreetype.6.dylib version incompatibility. Having figured it out, I feel it is worth documenting ... The setup is as follows: MacOS 10.9.5 IDL 8.3 Matlab ...

1 answers | 8 hours ago by user3035873 on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3