Email: feel free to contact me regarding my shared files on the file exchange. I don't do free consulting outside of the forum so if you have a Matlab question, post the question to the forum and you may email me the link to the question.

About me: Finishing PhD soon on topics related to vision science; neurophysiology; sensory-motor feedback and control; control systems; steering & navigation; multisensory integration; top-down bottom-up feedback loop.

"If I had only one hour to save the world, I would spend fifty-five minutes defining the problem, and only five minutes finding the solution." -Albert Einstein

"An expert is a person who has made all the mistakes that can be made in a very narrow field." -Niels Bohr

"If you are not embarrassed by the first version of your product, you've launched too late" - Reid Hoffman

Answered

MATLAB bug for plotting? Overlap between the x-ticks and the number labels: when using inverted y-axis and logarithmic x-axis.

The best solution is to upgrade to a newer release of Matlab. Update your current release might address the problem (I haven't...

MATLAB bug for plotting? Overlap between the x-ticks and the number labels: when using inverted y-axis and logarithmic x-axis.

The best solution is to upgrade to a newer release of Matlab. Update your current release might address the problem (I haven't...

1 día ago | 0

| accepted

Answered

Can a function known whether/which specific output is ignored (tilde operator)?

"Can a function known whether/which specific output is ignored ?" No. nargout tells you the number of output arguments specifi...

Can a function known whether/which specific output is ignored (tilde operator)?

"Can a function known whether/which specific output is ignored ?" No. nargout tells you the number of output arguments specifi...

2 días ago | 1

| accepted

Submitted

detectOutputSuppression

Identify which function outputs have been suppressed by the caller using the tilde operators.

2 días ago | 5 downloads |

Answered

How can I plot data from a text file--an array of numbers versus an array of strings?

Here's a variety of ways to use the strings as axis ticks. After a second look, you're probably looking for the last method. ...

How can I plot data from a text file--an array of numbers versus an array of strings?

Here's a variety of ways to use the strings as axis ticks. After a second look, you're probably looking for the last method. ...

3 días ago | 0

| accepted

Answered

Legend Color doesn't Match the Curves Color

I see the problem. Look at the values you're plotting. Assuming a=0.5e-2; semilogy(z,PDF_Hp,'LineWidth',4); PDF_Hp = Co...

Legend Color doesn't Match the Curves Color

I see the problem. Look at the values you're plotting. Assuming a=0.5e-2; semilogy(z,PDF_Hp,'LineWidth',4); PDF_Hp = Co...

3 días ago | 0

| accepted

Answered

how to write in the middle of ticks?

Datetime x-ticks for 6-month intervals It looks like you want to set xtick, not minor ticks. If your data are in datetime fo...

how to write in the middle of ticks?

Datetime x-ticks for 6-month intervals It looks like you want to set xtick, not minor ticks. If your data are in datetime fo...

3 días ago | 0

| accepted

Answered

Problem to read csv file with a blank line

The first character in your file is a semicolon (;) which is also the delimiter and that's making it difficult to import your da...

Problem to read csv file with a blank line

The first character in your file is a semicolon (;) which is also the delimiter and that's making it difficult to import your da...

4 días ago | 1

| accepted

Answered

Legend and Colors for Iteration function

Use the displayname property to assign the legend string and use the "color" property to set the line color. % Define colors ...

Legend and Colors for Iteration function

Use the displayname property to assign the legend string and use the "color" property to set the line color. % Define colors ...

4 días ago | 0

| accepted

Answered

How to draw line logarithmic x axis and y axis

Convert the dates to duration from the starting date but use the numeric form of the durations (ie, not the "duration' class). ...

How to draw line logarithmic x axis and y axis

Convert the dates to duration from the starting date but use the numeric form of the durations (ie, not the "duration' class). ...

4 días ago | 0

Answered

Standard error of regression curve

Follow this answer provided by MathWorks support [here]. Since the degrees of freedom are not defined in that answer, here's a ...

Standard error of regression curve

Follow this answer provided by MathWorks support [here]. Since the degrees of freedom are not defined in that answer, here's a ...

5 días ago | 0

| accepted

Answered

Writing data into a text file - fprintf

You need to pass the ReactionTime variable in as an input. function savedata(ReactionTime) . . . %savedata fprintf(fid, ...

Writing data into a text file - fprintf

You need to pass the ReactionTime variable in as an input. function savedata(ReactionTime) . . . %savedata fprintf(fid, ...

5 días ago | 2

Answered

How to compare each element of matrix to specific number and count it ?

m is your matrix, n is the number of values less than 3. n = sum(m<3,'all') There's no need for an if-statement.

How to compare each element of matrix to specific number and count it ?

m is your matrix, n is the number of values less than 3. n = sum(m<3,'all') There's no need for an if-statement.

5 días ago | 0

| accepted

Answered

Limiting UIAxes Interactivity in AppDesigner

The first line below turns off default interactivity and the second line turns off the toolbar options. disableDefaultInteract...

Limiting UIAxes Interactivity in AppDesigner

The first line below turns off default interactivity and the second line turns off the toolbar options. disableDefaultInteract...

5 días ago | 0

Answered

How can I create a temperature colormap over a global map with temperature data from lat/lon

imagesc(x,y,C) where x and y are your lon and lat data and C are your temp data. It's always a good idea to specify the axes,...

How can I create a temperature colormap over a global map with temperature data from lat/lon

imagesc(x,y,C) where x and y are your lon and lat data and C are your temp data. It's always a good idea to specify the axes,...

5 días ago | 0

| accepted

Answered

repeat elements of row matrix li [1 2 2 3 3 3 4 4 4 4 n...... n times]

If you want the output to be character vectors, n = 12; y = arrayfun(@(n){repmat(num2str(n),1,n)},1:n); % Output Sample: ...

repeat elements of row matrix li [1 2 2 3 3 3 4 4 4 4 n...... n times]

If you want the output to be character vectors, n = 12; y = arrayfun(@(n){repmat(num2str(n),1,n)},1:n); % Output Sample: ...

5 días ago | 0

Answered

How can I change the elements to zero when they are less than specific threshold

A(A<5) = 0; A(A<=5) = 0; B = A .* double(A>5); B = A .* double(A>=5); Try them out and choose one.

How can I change the elements to zero when they are less than specific threshold

A(A<5) = 0; A(A<=5) = 0; B = A .* double(A>5); B = A .* double(A>=5); Try them out and choose one.

5 días ago | 0

| accepted

Answered

What's the diameter of the standard circle marker 'o' in scatter3 plot ?

The size of scatter objects are in point units where 1 point equals 1/72 inch. Plot a single point and look at it's SizeData....

What's the diameter of the standard circle marker 'o' in scatter3 plot ?

The size of scatter objects are in point units where 1 point equals 1/72 inch. Plot a single point and look at it's SizeData....

5 días ago | 0

| accepted

Answered

App Designer - confirm exit when application is closed from Windows bar

Add a close request function to your app that requires confirmation. 1. From AppDesigner > Design View, right click the figure...

App Designer - confirm exit when application is closed from Windows bar

Add a close request function to your app that requires confirmation. 1. From AppDesigner > Design View, right click the figure...

6 días ago | 1

| accepted

Answered

str in a IF statement, PLEASE HELP

Why do you have a loop when the instructions ask for a single value? The use of break usually indicates inefficient coding. Ag...

str in a IF statement, PLEASE HELP

Why do you have a loop when the instructions ask for a single value? The use of break usually indicates inefficient coding. Ag...

6 días ago | 0

Answered

how to extract large number of data points from 2D plot

If you can reproduce the figure, just save the coordinates in addition to plotting them, plot(x,y,'o') save('coordinates.mat'...

how to extract large number of data points from 2D plot

If you can reproduce the figure, just save the coordinates in addition to plotting them, plot(x,y,'o') save('coordinates.mat'...

6 días ago | 0

Answered

How many colors with their name present in the image.

Here's how I explored your image data just-for-fun because I found it intersting and my solution to finding the number of colors...

How many colors with their name present in the image.

Here's how I explored your image data just-for-fun because I found it intersting and my solution to finding the number of colors...

6 días ago | 1

| accepted

Answered

How to get handle from currently running app made in App Designer?

3 ways to access your app handle In these examples the app's name is "MyApp". 1. Store the app handle when you open the app. ...

How to get handle from currently running app made in App Designer?

3 ways to access your app handle In these examples the app's name is "MyApp". 1. Store the app handle when you open the app. ...

6 días ago | 0

Answered

Explicit indices for k-fold partitioning

Perhaps something like x = 1:100; % demo vector k = 5; % 5-partitions folds = cell(k,1); for i = 1:k folds{i} =...

Explicit indices for k-fold partitioning

Perhaps something like x = 1:100; % demo vector k = 5; % 5-partitions folds = cell(k,1); for i = 1:k folds{i} =...

6 días ago | 0

Answered

Gaussian Function Formula, cftool app.

a1 is an amplitude parameter defining the height of the guassian. b1 is the "mu" parameter defining the center. c1 is the "s...

Gaussian Function Formula, cftool app.

a1 is an amplitude parameter defining the height of the guassian. b1 is the "mu" parameter defining the center. c1 is the "s...

7 días ago | 1

Answered

How to use matlab debugger

Matlab's factorial() function is being called somewhere when your code is executed. cumprod is a variable within factorial.m. ...

How to use matlab debugger

Matlab's factorial() function is being called somewhere when your code is executed. cumprod is a variable within factorial.m. ...

7 días ago | 0

Answered

Invalid first data argument

All of the name-value pairs must come after all other input arguments. plot3(___,Name,Value) The first syntax is accepted bec...

Invalid first data argument

All of the name-value pairs must come after all other input arguments. plot3(___,Name,Value) The first syntax is accepted bec...

7 días ago | 1

| accepted

Answered

How to avoid using for loops when declaring functions in a cell array

You only need 1 anonymous function if you include ii as a second input. ii must be a column vector and x must be a row vector. ...

How to avoid using for loops when declaring functions in a cell array

You only need 1 anonymous function if you include ii as a second input. ii must be a column vector and x must be a row vector. ...

7 días ago | 0

Answered

how to calculate optimal value of a unknown constant of an equation with known data points?

k = sqrt((1/y)^2 - x^2)

how to calculate optimal value of a unknown constant of an equation with known data points?

k = sqrt((1/y)^2 - x^2)

7 días ago | 0

Answered

Compare two array values that meet criteria

Your example only contains 1 close-match of values between A and B that are +/- 15 units apart. % Raw data; A and B can be an...

Compare two array values that meet criteria

Your example only contains 1 close-match of values between A and B that are +/- 15 units apart. % Raw data; A and B can be an...

7 días ago | 0

| accepted