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

Eliminate tables with more than 15% NaN data

This cellfun is a bit obnoxious but it produces an output select that is a logical vector the same size as C where true values i...

Eliminate tables with more than 15% NaN data

This cellfun is a bit obnoxious but it produces an output select that is a logical vector the same size as C where true values i...

alrededor de 18 horas ago | 1

| accepted

Answered

Selecting tables among 540 tables, based on a start and end date

Here's my thought process as I explore the data and solve the problem in parallel. Please take time to go through each line a...

Selecting tables among 540 tables, based on a start and end date

Here's my thought process as I explore the data and solve the problem in parallel. Please take time to go through each line a...

alrededor de 19 horas ago | 0

| accepted

Answered

How to add a waitbar into an app created in App designer? Not in a separate figure.

With AppDesigner you should be using uiprogressdlg() which displays a progress bar on top of your GUI but it is within an extern...

How to add a waitbar into an app created in App designer? Not in a separate figure.

With AppDesigner you should be using uiprogressdlg() which displays a progress bar on top of your GUI but it is within an extern...

alrededor de 20 horas ago | 0

Answered

How to add transparency to a dendrogram

Set up the dendrogram and store the line object handles from the first output of dendrogram(). % Set up the dendrogram X = ra...

How to add transparency to a dendrogram

Set up the dendrogram and store the line object handles from the first output of dendrogram(). % Set up the dendrogram X = ra...

alrededor de 22 horas ago | 0

Answered

How to call variable (with index) using string?

It sounds like at some point in your code you created a bunch of dynamically named variables. This opens a can of worms and mak...

How to call variable (with index) using string?

It sounds like at some point in your code you created a bunch of dynamically named variables. This opens a can of worms and mak...

1 día ago | 2

Answered

mean of columns in a cell

Inputs: cell_formatiert: your mxn cell array (presumably containing a mixture of numeric and character values, otherwise there...

mean of columns in a cell

Inputs: cell_formatiert: your mxn cell array (presumably containing a mixture of numeric and character values, otherwise there...

1 día ago | 0

| accepted

Answered

How to find a intersecting point in a GUI?

I'm a big fan of this file exchange submission: [x0,y0] = intersections(x1,y1,x2,y2). You can provide the (x,y) coordinates of...

How to find a intersecting point in a GUI?

I'm a big fan of this file exchange submission: [x0,y0] = intersections(x1,y1,x2,y2). You can provide the (x,y) coordinates of...

1 día ago | 0

Answered

AIC in a Gaussian Mixture Regression

This computes the AIC and the AICc using the following defined inputs. % RSS: Vector; residual sum of squares between your data...

AIC in a Gaussian Mixture Regression

This computes the AIC and the AICc using the following defined inputs. % RSS: Vector; residual sum of squares between your data...

1 día ago | 0

Answered

Getting the linear portion of a non-linear curve

If you have the x values of the red lines, it's as easy as bounds = [x1,x2]; % [lower, upper] bounds (red lines) keepIdx = x...

Getting the linear portion of a non-linear curve

If you have the x values of the red lines, it's as easy as bounds = [x1,x2]; % [lower, upper] bounds (red lines) keepIdx = x...

1 día ago | 0

Answered

How to convert each row in a cell array to a (1*n ) double matrix?

I like David Hill's solution but here's another one because I already wrote it up so, why not share it? load('Key.mat') % ...

How to convert each row in a cell array to a (1*n ) double matrix?

I like David Hill's solution but here's another one because I already wrote it up so, why not share it? load('Key.mat') % ...

1 día ago | 1

Answered

How to create a table of 3 variables ?

"I have a matrix Thm = [hours,days,months]" This example below produces a 3 x 24 matrix where row 1 are hours, row 2 are days, ...

How to create a table of 3 variables ?

"I have a matrix Thm = [hours,days,months]" This example below produces a 3 x 24 matrix where row 1 are hours, row 2 are days, ...

1 día ago | 0

Answered

Add coordinate points (latitude and longitude) on a figure

hold on plot(coordinates.lon, coordinates.lat, 'kx') xlabel('Longitude') ylabel('Latitude')

Add coordinate points (latitude and longitude) on a figure

hold on plot(coordinates.lon, coordinates.lat, 'kx') xlabel('Longitude') ylabel('Latitude')

1 día ago | 1

| accepted

Answered

Extract the X and Y values of curve in image

Without the original data or the figure file you'll have to use a digitizing program that estimates the coordinates of the curve...

Extract the X and Y values of curve in image

Without the original data or the figure file you'll have to use a digitizing program that estimates the coordinates of the curve...

1 día ago | 0

Answered

Selecting a portion of the tables

% extract row 1 of each table stored in cell array C firstRows = cellfun(@(m)m(1,:),C,'UniformOutput',false).'; % Vertically...

Selecting a portion of the tables

% extract row 1 of each table stored in cell array C firstRows = cellfun(@(m)m(1,:),C,'UniformOutput',false).'; % Vertically...

2 días ago | 1

| accepted

Answered

Showing more than one image in a GUIDE gui

Specify the axis when calling imshow (see parent name-value) imshow(wiggle_file_name, 'Parent', handles.axes2) "I am not sur...

Showing more than one image in a GUIDE gui

Specify the axis when calling imshow (see parent name-value) imshow(wiggle_file_name, 'Parent', handles.axes2) "I am not sur...

2 días ago | 0

Answered

How to compare each element of a matrix with a number ?

Since A are of class double and the </> comparisons will produce logical values, you cannot combine them in a matrix. Instead, ...

How to compare each element of a matrix with a number ?

Since A are of class double and the </> comparisons will produce logical values, you cannot combine them in a matrix. Instead, ...

2 días ago | 1

| accepted

Answered

How can I find the same value by using cellfun?

condition = {[11,1],[11,1],[12,2],[12,2],[11,1]}; idx = cellfun(@(v)isequal(v,[11,1]),condition); Your code didn't work bec...

How can I find the same value by using cellfun?

condition = {[11,1],[11,1],[12,2],[12,2],[11,1]}; idx = cellfun(@(v)isequal(v,[11,1]),condition); Your code didn't work bec...

2 días ago | 1

Answered

How to add another plot to box plot?

Summary of comments under the question The problem was that the x axis limit was [0,1] while the plotted data were at x=2. Th...

How to add another plot to box plot?

Summary of comments under the question The problem was that the x axis limit was [0,1] while the plotted data were at x=2. Th...

2 días ago | 1

Answered

How to sort filenames that are stored by dir command

This uses regular expressions to extract the file number in the pattern file###. If that pattern is not found, the file number ...

How to sort filenames that are stored by dir command

This uses regular expressions to extract the file number in the pattern file###. If that pattern is not found, the file number ...

3 días ago | 0

Answered

How to extract data corresponding to a date and time?

Here's how to get the indices of the datetime array that are within +/- 1 hour of the target time. % Create datetime array t...

How to extract data corresponding to a date and time?

Here's how to get the indices of the datetime array that are within +/- 1 hour of the target time. % Create datetime array t...

3 días ago | 0

| accepted

Answered

Plotting on GUI and navigate between the figures

Summary of the comments under the question: Instead of using the [<<] and [>>] buttons to toggle through various data sets that...

Plotting on GUI and navigate between the figures

Summary of the comments under the question: Instead of using the [<<] and [>>] buttons to toggle through various data sets that...

3 días ago | 0

| accepted

Answered

adding single quotation to a string

filename = sprintf('"%s"',string(extractBetween(filename, "Scans\\", filename(end)))); Result: filename2 = '"GComScan_2020011...

adding single quotation to a string

filename = sprintf('"%s"',string(extractBetween(filename, "Scans\\", filename(end)))); Result: filename2 = '"GComScan_2020011...

3 días ago | 0

| accepted

Answered

File association does not work for R2019b installed on Windows 10

If you're referring to Matlab file associations in Windows such as m-files not openning in MATLAB or opening up in a new instanc...

File association does not work for R2019b installed on Windows 10

If you're referring to Matlab file associations in Windows such as m-files not openning in MATLAB or opening up in a new instanc...

3 días ago | 0

Answered

Finding the percentage of NaN cells in columns

Using the C.mat file from your previous questions, here's a simple way to produce the table you're describing. load('C.mat'); ...

Finding the percentage of NaN cells in columns

Using the C.mat file from your previous questions, here's a simple way to produce the table you're describing. load('C.mat'); ...

3 días ago | 1

Answered

How to read this date format yyyymmddHHMMSS.SS ?

Datetime values are much better than datenum values. Nevertheless, here's how to convert your datestrings to both. % Date str...

How to read this date format yyyymmddHHMMSS.SS ?

Datetime values are much better than datenum values. Nevertheless, here's how to convert your datestrings to both. % Date str...

3 días ago | 1

| accepted

Answered

How to export Excel files to the specific folder?

Use the fullPath = fullfile(path, filename) function to create full paths to files. This offers a number of very important bene...

How to export Excel files to the specific folder?

Use the fullPath = fullfile(path, filename) function to create full paths to files. This offers a number of very important bene...

3 días ago | 2

| accepted

Answered

Grid overlay on "plots()"

Here are two ways of adding a grid to a plot. Use the grid function Use grid on to turn on the axis grid where a grid line wi...

Grid overlay on "plots()"

Here are two ways of adding a grid to a plot. Use the grid function Use grid on to turn on the axis grid where a grid line wi...

4 días ago | 0

Answered

PARULA colormap when working with point cloud data

The colors of a colormap do not have any inherent meaning. They are merely scales that cover the range of your data or whatever...

PARULA colormap when working with point cloud data

The colors of a colormap do not have any inherent meaning. They are merely scales that cover the range of your data or whatever...

4 días ago | 0

| accepted

Answered

Heatmap seems to delete axes component

In reference to this part of your quesiton: ax=axes(handles.axes2) h1 = heatmap(ax,B); h1.Colormap = cool; h1.Cell...

Heatmap seems to delete axes component

In reference to this part of your quesiton: ax=axes(handles.axes2) h1 = heatmap(ax,B); h1.Colormap = cool; h1.Cell...

4 días ago | 0

| accepted

Answered

how to show/hide colorbar by using menu

This line below should throw an error (r2019b). get(colorbar,'enable','off') Error using matlab.graphics.illustration.ColorB...

how to show/hide colorbar by using menu

This line below should throw an error (r2019b). get(colorbar,'enable','off') Error using matlab.graphics.illustration.ColorB...

4 días ago | 0