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

Exporting the plot in regression learner

Option 1 Export the figure from the Regression Learner App (red box below). Option 2 Export the axes programmatically (te...

Exporting the plot in regression learner

Option 1 Export the figure from the Regression Learner App (red box below). Option 2 Export the axes programmatically (te...

1 dag ago | 0

Answered

"The file has been modified outside of MATLAB Editor. Do you want to reload it?" error. How to repair that?

This is a band aid, not a solution. This is the error dialog that appears when a files stored on a mapped network drive are e...

"The file has been modified outside of MATLAB Editor. Do you want to reload it?" error. How to repair that?

This is a band aid, not a solution. This is the error dialog that appears when a files stored on a mapped network drive are e...

1 dag ago | 0

Answered

A function that outputs multiple plots? Part 2

If you want to set the figure number, h = figure(); % or h = figure(5); plotoutput(__,h) % fill in your other inputs ...

A function that outputs multiple plots? Part 2

If you want to set the figure number, h = figure(); % or h = figure(5); plotoutput(__,h) % fill in your other inputs ...

2 dagen ago | 0

Answered

How to enable the colorbar to only show the vertical scale with values ?

The plot below was produced using your exact code as it appears in the comment under the question plus the following two lines a...

How to enable the colorbar to only show the vertical scale with values ?

The plot below was produced using your exact code as it appears in the comment under the question plus the following two lines a...

2 dagen ago | 0

Answered

App Designer - Understanding the Basics

The problem, as the error message indicates, is that HeatmapChart objects cannot be a child of UIAxes. It's just not supported ...

App Designer - Understanding the Basics

The problem, as the error message indicates, is that HeatmapChart objects cannot be a child of UIAxes. It's just not supported ...

2 dagen ago | 0

Answered

upper axis title doesn't fit in the output of my plot

Reduce the height of the first axis % This reduced the height to 80% % Play around with the value to get what you want ax1.P...

upper axis title doesn't fit in the output of my plot

Reduce the height of the first axis % This reduced the height to 80% % Play around with the value to get what you want ax1.P...

2 dagen ago | 0

| accepted

Answered

How to add a noise in my Input graph?

noise = randn(size(signal)) will return an array of random values from a standard normal distribution with mean=0 and varianc...

How to add a noise in my Input graph?

noise = randn(size(signal)) will return an array of random values from a standard normal distribution with mean=0 and varianc...

2 dagen ago | 0

Answered

Using data from timetable to make a histogram

Use histogram(x) where x is your data TT1.stddev1. See that link of additional syntaxes that allow you to set the bins.

Using data from timetable to make a histogram

Use histogram(x) where x is your data TT1.stddev1. See that link of additional syntaxes that allow you to set the bins.

2 dagen ago | 0

Answered

Filling in the area around an ellipse?

x = [x_frame, ellipse_x]; y = [y_frame, ellipse_y]; patch(x,y, 'r', 'EdgeColor', 'none') axis equal % optional

Filling in the area around an ellipse?

x = [x_frame, ellipse_x]; y = [y_frame, ellipse_y]; patch(x,y, 'r', 'EdgeColor', 'none') axis equal % optional

3 dagen ago | 0

| accepted

Answered

Create a plot for local max peaks given a certain time range.

It's unclear what some of your variables are and how they relate to each other. For example, what's the second row of y? How d...

Create a plot for local max peaks given a certain time range.

It's unclear what some of your variables are and how they relate to each other. For example, what's the second row of y? How d...

4 dagen ago | 0

Answered

Patch plot z-values colorbar not correct

There are several issues to cover. 1) If you want to use 1 colorbar to represent all subplots, all subplots must have the same...

Patch plot z-values colorbar not correct

There are several issues to cover. 1) If you want to use 1 colorbar to represent all subplots, all subplots must have the same...

5 dagen ago | 0

Answered

How can I delete an entire row/element of a matrix/array and also delete the same row/element from another matrix/array?

Since the column vectors should be the same length, I recommend you combine them into a matrix (shown below) or a table. m = [...

How can I delete an entire row/element of a matrix/array and also delete the same row/element from another matrix/array?

Since the column vectors should be the same length, I recommend you combine them into a matrix (shown below) or a table. m = [...

5 dagen ago | 0

| accepted

Answered

scroll programmatically within uitable

A function (findjobj) on the file exchange supports programmatic scrolling on uitables when the uitable is embedded in a regular...

scroll programmatically within uitable

A function (findjobj) on the file exchange supports programmatic scrolling on uitables when the uitable is embedded in a regular...

5 dagen ago | 0

| accepted

Answered

How to get numbers from char array?

Assuming your string is named, str, str = '@(S)sigmoid(S,-1.588276e+00,-2.598747e-01)'; numstr = regexp(str,'(-)?\d+(\.\d+)?(...

How to get numbers from char array?

Assuming your string is named, str, str = '@(S)sigmoid(S,-1.588276e+00,-2.598747e-01)'; numstr = regexp(str,'(-)?\d+(\.\d+)?(...

5 dagen ago | 0

| accepted

Answered

populate a listbox with selected folder doc file names - App designer

Give this a shot, docFileInfo = dir(fullfile(app.selectedPath, '*.doc')); app.docListBox.Items = {docFileInfo.name}';

populate a listbox with selected folder doc file names - App designer

Give this a shot, docFileInfo = dir(fullfile(app.selectedPath, '*.doc')); app.docListBox.Items = {docFileInfo.name}';

5 dagen ago | 0

| accepted

Answered

How to convert categorical data to numeric in separate columns?

Here's a more efficient solution. % Create demo data location = categorical({'Asia','US','Asia','Africa','Africa','US','US','...

How to convert categorical data to numeric in separate columns?

Here's a more efficient solution. % Create demo data location = categorical({'Asia','US','Asia','Africa','Africa','US','US','...

5 dagen ago | 0

Answered

How can I plot and reach to this figure ?

I'm not going to do your work for you but I can give you some hints that will get you started. If you are unfamiliar with a func...

How can I plot and reach to this figure ?

I'm not going to do your work for you but I can give you some hints that will get you started. If you are unfamiliar with a func...

10 dagen ago | 0

Answered

how to add a normal distribution to a figure?

You can use this fully parameterized guassian function explained here https://www.mathworks.com/matlabcentral/answers/370386-ho...

how to add a normal distribution to a figure?

You can use this fully parameterized guassian function explained here https://www.mathworks.com/matlabcentral/answers/370386-ho...

10 dagen ago | 1

Answered

"Index esceeds the number of array elements (1)". When clearly there is capacity for 201 spaces in the array, what is happening!?

"Index esceeds the number of array elements (1)". When clearly there is capacity for 201 spaces in the array, what is happening!...

"Index esceeds the number of array elements (1)". When clearly there is capacity for 201 spaces in the array, what is happening!?

"Index esceeds the number of array elements (1)". When clearly there is capacity for 201 spaces in the array, what is happening!...

10 dagen ago | 1

| accepted

Answered

I'd like to plot color image histograms that combine color as RGB

By setting transparency to a value less than 1, overlapping histograms will show the combined colors. However, since the histog...

I'd like to plot color image histograms that combine color as RGB

By setting transparency to a value less than 1, overlapping histograms will show the combined colors. However, since the histog...

10 dagen ago | 0

Answered

Why is it that the breakpoint does not work?

First, make sure the breakpoint is valid. Invalid break points are gray, valid break points are red. For more info, see "invali...

Why is it that the breakpoint does not work?

First, make sure the breakpoint is valid. Invalid break points are gray, valid break points are red. For more info, see "invali...

10 dagen ago | 0

| accepted

Answered

how to plot 2 curve with together

The code results in the error, Error using * Incorrect dimensions for matrix multiplication. Check that the number of column...

how to plot 2 curve with together

The code results in the error, Error using * Incorrect dimensions for matrix multiplication. Check that the number of column...

10 dagen ago | 1

Answered

How can I make the plot transparent in a gscattter?

Setting transparency of markers with gscatter is not possible as of r2020a. Workarounds You could use scatter() which does s...

How can I make the plot transparent in a gscattter?

Setting transparency of markers with gscatter is not possible as of r2020a. Workarounds You could use scatter() which does s...

11 dagen ago | 0

| accepted

Answered

How to concatenate a row of variable names and a double?

You can concatenate them within a cell array. Based on your question and title, I'm guessing you've got a row of variable names...

How to concatenate a row of variable names and a double?

You can concatenate them within a cell array. Based on your question and title, I'm guessing you've got a row of variable names...

12 dagen ago | 0

Answered

Linking x and y axis zoom in subplot

See linkprop() Link the xlim and ylim properties. Or use or linkaxes() Here's a demo. It uses tiledlayout instead of subpl...

Linking x and y axis zoom in subplot

See linkprop() Link the xlim and ylim properties. Or use or linkaxes() Here's a demo. It uses tiledlayout instead of subpl...

12 dagen ago | 0

Answered

how to label strings in an array with an ID

See ismember() StringID needs to be a cell array. Then, [~, idx] = ismember(tc,StringID(:,1)); Also see lower() if you want...

how to label strings in an array with an ID

See ismember() StringID needs to be a cell array. Then, [~, idx] = ismember(tc,StringID(:,1)); Also see lower() if you want...

12 dagen ago | 0

| accepted

Answered

Count the number of indices between two indices

If and only if the following rules are met, the solution is very simple. For every "1" there will be a "-1" and for every "-1"...

Count the number of indices between two indices

If and only if the following rules are met, the solution is very simple. For every "1" there will be a "-1" and for every "-1"...

12 dagen ago | 0

| accepted

Answered

Difference between %d and %f?

Refer to the documentation. %d represents signed integers (base 10). sprintf('John is %d years old', 7) % 'John is 7 year...

Difference between %d and %f?

Refer to the documentation. %d represents signed integers (base 10). sprintf('John is %d years old', 7) % 'John is 7 year...

12 dagen ago | 0

| accepted

Answered

Calculating mean and SD of histogram

Guessing that column 1 of the data are x-values to the bar plot and column 2 of the data are the bar heights, you can fit a guas...

Calculating mean and SD of histogram

Guessing that column 1 of the data are x-values to the bar plot and column 2 of the data are the bar heights, you can fit a guas...

13 dagen ago | 0

Answered

Drawing a rectangle over existing plot

To use an annotation object in the way you're describing, you'd need to convert the data units, which are relative to the axes, ...

Drawing a rectangle over existing plot

To use an annotation object in the way you're describing, you'd need to convert the data units, which are relative to the axes, ...

15 dagen ago | 0

| accepted