166 total contributions since 2011

Professional Interests: Mathematics and statistics

Submitted

Draw or add axes to figure

Super helpful way to visualize axes in a 2D figure.

3 months ago | 0 downloads |

Submitted

Color-balance demo with GPU computing

Use GPU in MATLAB to perform white-balance operation to input image.

3 months ago | 18 downloads |

Submitted

Laplacian eigenmap ~ Diffusion map ~ manifold learning

Demo techniques of nonlinear eigenmaps for the purpose of recovering low-dimensional geometries.

3 months ago | 50 downloads |

Answered

Record timing of user input

I think you want |tic| and |toc|, as in the example below: % I will create a cell that represents some collection of images...

Record timing of user input

I think you want |tic| and |toc|, as in the example below: % I will create a cell that represents some collection of images...

3 years ago | 2

| accepted

Answered

how do i vectorise given code?

I do not see how the example you provided will execute if |A| is any standard MATLAB data type. In particular, if |A| is a MA...

how do i vectorise given code?

I do not see how the example you provided will execute if |A| is any standard MATLAB data type. In particular, if |A| is a MA...

3 years ago | 0

Answered

Return specified rows of a vector

Try A = [4;8;2;3;8;6]; i = [1;3;5;6]; B = A(i)

Return specified rows of a vector

Try A = [4;8;2;3;8;6]; i = [1;3;5;6]; B = A(i)

3 years ago | 1

| accepted

Answered

Need half of my contour plot

Check out the |tril| and |triu| functions. For example if you have data similar to [x,y]= meshgrid(-1:.05:1); z = x.^2+...

Need half of my contour plot

Check out the |tril| and |triu| functions. For example if you have data similar to [x,y]= meshgrid(-1:.05:1); z = x.^2+...

3 years ago | 0

| accepted

Question

What would you do?

Suppose you have a string like rhs = 'x*cos(x)/(t+1)'; and that you want to create a function handle... would you do ...

3 years ago | 2 Answers | 0

Answered

Is this even possible?

Have you tried right-clicking on the file from the current folder browser? In the context-menu that pops up you should see some...

Is this even possible?

Have you tried right-clicking on the file from the current folder browser? In the context-menu that pops up you should see some...

3 years ago | 0

Answered

Simple Question about Optimization of Nested IF-FOR loops

First of all, it appears that each time through the outer-most loop (the first one), the variable |iPointsinSlice| does not chan...

Simple Question about Optimization of Nested IF-FOR loops

First of all, it appears that each time through the outer-most loop (the first one), the variable |iPointsinSlice| does not chan...

3 years ago | 0

Answered

Subscript indices must either be real positive integers or logicals

There are several issues you need to resolve with your code before it will run. First, there is no increment operator in MATLAB...

Subscript indices must either be real positive integers or logicals

There are several issues you need to resolve with your code before it will run. First, there is no increment operator in MATLAB...

3 years ago | 0

| accepted

Answered

Convert vector to cell array

The third input to the |fints| function is a cell array of strings that can be valid MATLAB identifiers. That is, the strings c...

Convert vector to cell array

The third input to the |fints| function is a cell array of strings that can be valid MATLAB identifiers. That is, the strings c...

3 years ago | 0

| accepted

Answered

How to visualize the matrix with colored entries

What are the features that make your data suspicious? For example, if the suspicious data is all very large (say 2 standard dev...

How to visualize the matrix with colored entries

What are the features that make your data suspicious? For example, if the suspicious data is all very large (say 2 standard dev...

3 years ago | 0

Answered

How to do a 3D circle in matlab

I assume you do not have a parametric form for the circle in 3D, but you do have the equation for the plane where the circle liv...

How to do a 3D circle in matlab

I assume you do not have a parametric form for the circle in 3D, but you do have the equation for the plane where the circle liv...

3 years ago | 1

Answered

Simpl equestion about CUMSUM

I don't think I would use cumsum here. Instead, try A = sum(bsxfun(@gt,B',0:299)); Note, this command above assumes B i...

Simpl equestion about CUMSUM

I don't think I would use cumsum here. Instead, try A = sum(bsxfun(@gt,B',0:299)); Note, this command above assumes B i...

3 years ago | 0

| accepted

Answered

match the first letter in a cell and save

Try this (I assume your cell is called |variable|) idx = cellfun(@(s)strncmp(s,'P',1),variable) newCell = variable(idx);...

match the first letter in a cell and save

Try this (I assume your cell is called |variable|) idx = cellfun(@(s)strncmp(s,'P',1),variable) newCell = variable(idx);...

3 years ago | 0

| accepted

Answered

how to remove NaN

You're very close try % idx(i) is true if contents in row i, column 6 of M equals NaN idx = cellfun(@isnan,M(:,6)) ...

how to remove NaN

You're very close try % idx(i) is true if contents in row i, column 6 of M equals NaN idx = cellfun(@isnan,M(:,6)) ...

3 years ago | 1

Answered

PLOT COMMAND USING string arguments

Maybe try x = eval(get(text1,'string')); y = eval(get(text2,'string')); axes(plot1); plot(x,y);

PLOT COMMAND USING string arguments

Maybe try x = eval(get(text1,'string')); y = eval(get(text2,'string')); axes(plot1); plot(x,y);

3 years ago | 0

| accepted

Answered

calculate a vector from consecutive vectors without a loop

Totally.. try something like yourVector = 1:100; avgWindow = 1/10*ones(1,10); % each value is 1/10 movingAverage ...

calculate a vector from consecutive vectors without a loop

Totally.. try something like yourVector = 1:100; avgWindow = 1/10*ones(1,10); % each value is 1/10 movingAverage ...

3 years ago | 1

| accepted

Answered

Sliders in Matlab GUI

Check out this simple function.. you should be able to copy and paste it into a new file, save the file with the name |simplePro...

Sliders in Matlab GUI

Check out this simple function.. you should be able to copy and paste it into a new file, save the file with the name |simplePro...

3 years ago | 0

| accepted

Answered

lines to curves drawing problem

I assume you have the variables |x| and |y| which are vectors representing the values in the x-component and in the y-component ...

lines to curves drawing problem

I assume you have the variables |x| and |y| which are vectors representing the values in the x-component and in the y-component ...

3 years ago | 1

| accepted

Answered

Create an image stack (3-D matrix)

Execute this command after your code above to get the three gray-scale images you create into one 3D matrix of grayscale image...

Create an image stack (3-D matrix)

Execute this command after your code above to get the three gray-scale images you create into one 3D matrix of grayscale image...

3 years ago | 0

| accepted

Answered

create a function handle extracting pieces from a matrix function handle

Starting from your example A = @(x) [1 2 x; 2*x x.^2 3]; you probably realized that *this command is not allowed* B...

create a function handle extracting pieces from a matrix function handle

Starting from your example A = @(x) [1 2 x; 2*x x.^2 3]; you probably realized that *this command is not allowed* B...

3 years ago | 0

| accepted

Answered

How can I calculate and compare the energy of the curvelet coefficients to compare in thresholding code?

When you decompose a function |f| in an orthonormal basis, you can relate the sum of the square of the coefficients to the L2-no...

How can I calculate and compare the energy of the curvelet coefficients to compare in thresholding code?

When you decompose a function |f| in an orthonormal basis, you can relate the sum of the square of the coefficients to the L2-no...

3 years ago | 0

| accepted

Answered

Matrix is close to singular or badly scaled

There is a closed form expression for the inverse of a 2-by-2 matrix <http://mathworld.wolfram.com/MatrixInverse.html here> (see...

Matrix is close to singular or badly scaled

There is a closed form expression for the inverse of a 2-by-2 matrix <http://mathworld.wolfram.com/MatrixInverse.html here> (see...

3 years ago | 0

| accepted

Answered

Loop variable names and file names

Check your |for|-loop. The iteration variable is |iName|, but you use |i| in the loop's body. Since you do not define |i|, MATL...

Loop variable names and file names

Check your |for|-loop. The iteration variable is |iName|, but you use |i| in the loop's body. Since you do not define |i|, MATL...

3 years ago | 0

| accepted

Answered

How do I add a 2D Plot along with a surface or mesh plot in MATLAB?

Does this get you started? % create figure figure % Generate data to make a surface x = -1:0.1:1; y = -1:0...

How do I add a 2D Plot along with a surface or mesh plot in MATLAB?

Does this get you started? % create figure figure % Generate data to make a surface x = -1:0.1:1; y = -1:0...

3 years ago | 1

| accepted

Answered

second order nonlinear ode with polynomial terms

You must write the ODE as a system of first-order ODEs. Use the substitution u1 = y and u2 = y'. Then, you'll end up with equa...

second order nonlinear ode with polynomial terms

You must write the ODE as a system of first-order ODEs. Use the substitution u1 = y and u2 = y'. Then, you'll end up with equa...

3 years ago | 0

Answered

Force polynomial fit through multiple points

I assume your data is given by two row vectors xData and yData, given for example by xData = linspace(-2,2); yData = 2.3...

Force polynomial fit through multiple points

I assume your data is given by two row vectors xData and yData, given for example by xData = linspace(-2,2); yData = 2.3...

3 years ago | 2

Answered

solving non linear third order algebaric expressions using newton rapson method or any other method!!!

The |fsolve| function needs a function handle as input. So create a file with the command edit yourFun.m and paste this...

solving non linear third order algebaric expressions using newton rapson method or any other method!!!

The |fsolve| function needs a function handle as input. So create a file with the command edit yourFun.m and paste this...

3 years ago | 0