Question

How to use eval(sprintf) without padding?

Dear All, I inherited a code snippet as part of a larger routine, so I have to use it with minor modifications. With it, a t...

2 years ago | 3 answers | 0

Question

Error parfor worker aborted

Dear All, I have a parfor loop with n iterations (n between 20 and 200), and using input matrices depending n^2 on the size ...

4 years ago | 0 answers | 0

Question

Clearing variables in function workspace effect on memory

Dear All, I have a script calling a function, with several large matrices present in this function's workspace. I would need...

4 years ago | 1 answer | 0

Question

help vectorize code for GPU

Dear All, I have a for loop code snippet which in essence, involves 2D matrix or elementwise multiplication, and 2D matrix a...

4 years ago | 1 answer | 0

Question

Square matrix factorization to increase sparsity for GPU use

Dear All, I have a full (no zeros) real asymmetric square matrix A in a loop on the GPU (to increase execution speed compare...

4 years ago | 0 answers | 0

Question

parallel processing on one (several) GPUs

Dear All, Can I execute a parallel script on one GPU? If not, how can I direct each worker to a specific GPU of choice (say ...

4 years ago | 1 answer | 0

Question

GPU gather command clarification and GPU memory usage

Dear All, 1. If x is a gpuarray, and y its cpu correspondent, after the command y=gather(x) is x still on the GPU or ...

4 years ago | 1 answer | 1

Question

Diagonal matrix size reduction

Dear All, I have a loop written for GPU (gpuarrays) with multiple matrix inputs, one of which is a diagonal matrix A with si...

4 years ago | 1 answer | 0

Question

How to use ResizeFcn to normalize MarkerSize (plot3) and FontSize (text)?

Dear All, I have a figure containing several linked objects (a plot3 surface, a plot3 set of 3D points, and a set of associa...

4 years ago | 0 answers | 0

Question

How to add to a figure a second set of 3D axes insensitive to rotate3d, pan, zoom?

Dear All, I have a plot3 object (3D surface) in a figure that I can (and often have to) freely rotate3d, pan, zoom. I need t...

4 years ago | 1 answer | 0

Question

How to pass iteration information to fmincon's nonlcon function?

Dear all, My code uses fmincon to minimize the distance from (snap) a set of points to a surface and find snapped coordinate...

4 years ago | 0 answers | 0

Question

Issues with zooming using ActionPreCallback ActionPostCallback

Dear All, Zooming and rotating 3D a large object (cortex hull) by mouse click leads to a very and slow and choppy object mov...

4 years ago | 0 answers | 0

Question

How to compare workspace variable to variable saved on disk and save if different.

Dear All, here is my challenge. I use an script that generates an output variable varx in workspace and saves it to a binary...

4 years ago | 0 answers | 0

Question

validate function inputs independent of position and name

Dear All, I have the function f(a b c d), with a b c d inputs all structure arrays, a and b required, c and d optional. I ...

4 years ago | 1 answer | 0

Question

sprintf literal output as next pending command

Dear All, I have a cell array DD with cells containing strings formed from letters, eg 'SFG' (some consecutive cells have id...

4 years ago | 0 answers | 0

Question

adding empty numerical fields in structure array

Dear All, I am sure this is trivial for you wizzes. I have a structure A with fields A.field1,A.field2, A.field3, with fiel...

4 years ago | 1 answer | 0

Question

gpu memory code optimization

Dear Wizes, I would appreciate if you could break this: My code includes gpuArray operations inside a for loop; the relevan...

4 years ago | 0 answers | 0

Question

How to optimize gpuArray operation to minimize GPU memory

Dear All, I have to do A-B, where A, B are gpuArrays of 20000X20000 elements (single precision). Each of A and B is ~ 1.6 Gb...

4 years ago | 1 answer | 0

Question

gpuArray memory requirement estimation

Dear All, I was running a script employing parallel processing and a gpuArray structure. I get the following error on two PC...

4 years ago | 2 answers | 0

Question

How to build a ROC curve using perfcurve with a single class?

Dear All, I study a method that estimates the position of a set of test points against a reference point. One of the metrics...

5 years ago | 0 answers | 0

Question

how to find the weighted centroid, center of mass/barycenter of a 3D grid of points

Dear all, I am new to matlab, I need to find the coordinates of the center of mass of a regular 3D grid of points, each point ...

5 years ago | 1 answer | 0

Answered

How to use eval(sprintf) without padding?

Dear Image Analyst & All, I found a solution, to follow to my initial code posted; these lines would delete those all 0 rows ...

How to use eval(sprintf) without padding?

Dear Image Analyst & All, I found a solution, to follow to my initial code posted; these lines would delete those all 0 rows ...

5 years ago | 0

| accepted

Answered

How to use eval(sprintf) without padding?

Sorry, but the above does not save individual .mat arrays for each cluster (SO, MO and OP), nor gets coordinates in the orde...

How to use eval(sprintf) without padding?

Sorry, but the above does not save individual .mat arrays for each cluster (SO, MO and OP), nor gets coordinates in the orde...

5 years ago | 0

Question

How to load variable listed in folder one at a time and run a script sequentially

Dear all, I have different .mat expressions (values) of the same variable VAR in a list of numerical arrays named differentl...

5 years ago | 1 answer | 0

Answered

how to plot semilogy on two axes

Dear dpb, set(H2,'Color','none'); is necessary, otherwise data plots are obscured during the second x axis (top, H2) defi...

how to plot semilogy on two axes

Dear dpb, set(H2,'Color','none'); is necessary, otherwise data plots are obscured during the second x axis (top, H2) defi...

5 years ago | 0

Question

how to plot semilogy on two axes

Dear All, I have three sets of data (y1,2,3), and I want to plot them on a semilogarithmic (y) scale using the same x scal...

5 years ago | 2 answers | 0

Question

how to change matlabroot on ubuntu 12.04

Dear All, I have 2012b installed and working on my ubuntu 12.04 box, I just downloaded and installed the 2013b version, but ...

5 years ago | 1 answer | 0

Question

multivariate normal random numbers noise

Dear All, I need to simulate multivariate noise according to noise variance (mu) in a number of sensors, and covariance (sig...

6 years ago | 0 answers | 0