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

Insert all in matrix

You can either store the outputs in a cell array like this i=1; for S=0.05:0.05:1 LIV{i}=ricerca(V0,W,S,N) % ^ ^ ...

Insert all in matrix

You can either store the outputs in a cell array like this i=1; for S=0.05:0.05:1 LIV{i}=ricerca(V0,W,S,N) % ^ ^ ...

circa 12 ore ago | 0

| accepted

Answered

How to graph values of a function above and below 0 as separate functions?

The conditional statements in your code aren't doing what you think they are doing. They return true only when the entire vecto...

How to graph values of a function above and below 0 as separate functions?

The conditional statements in your code aren't doing what you think they are doing. They return true only when the entire vecto...

circa 12 ore ago | 1

Answered

how to add a single blank row in a table

Note that "missing" values are represented by NaN values for numeric data. % Create demo table T = array2table(reshape(1:9,3,...

how to add a single blank row in a table

Note that "missing" values are represented by NaN values for numeric data. % Create demo table T = array2table(reshape(1:9,3,...

circa 12 ore ago | 0

Answered

Conversion to cell from double is not possible.

dx{k} = imfilter(g{k},h1); dy{k} = imfilter(g{k},h2); % ^ ^ Use curley brackets or dx(k) = {imfilter(g{k},h...

Conversion to cell from double is not possible.

dx{k} = imfilter(g{k},h1); dy{k} = imfilter(g{k},h2); % ^ ^ Use curley brackets or dx(k) = {imfilter(g{k},h...

circa 13 ore ago | 1

| accepted

Answered

Which version I should download for 2 GB RAM?

Look through this table that lists the minimum system requirements across all Matlab releases for multiple systems. R2017b (M...

Which version I should download for 2 GB RAM?

Look through this table that lists the minimum system requirements across all Matlab releases for multiple systems. R2017b (M...

circa 13 ore ago | 0

Answered

Calculate longterm daily average

Create timetable (from OP's code) mat = randi([0 14600], 730, 5, 2); sc1 = (datetime(1981,1,1):datetime(1982,12,31))'; splitm...

Calculate longterm daily average

Create timetable (from OP's code) mat = randi([0 14600], 730, 5, 2); sc1 = (datetime(1981,1,1):datetime(1982,12,31))'; splitm...

circa 14 ore ago | 1

| accepted

Answered

Error using plot Invalid data argument.

function y = U(t) t = -3:0.0001:3; y= 1*(t>=0); plot(t,U(t)) % ^^^^problem You're recursively calling the U(t) functio...

Error using plot Invalid data argument.

function y = U(t) t = -3:0.0001:3; y= 1*(t>=0); plot(t,U(t)) % ^^^^problem You're recursively calling the U(t) functio...

circa 14 ore ago | 0

Answered

how can I combine several file.fig together

It's unclear whether you want to combine each line into the same axes or if you want to combine each axes into the same figure a...

how can I combine several file.fig together

It's unclear whether you want to combine each line into the same axes or if you want to combine each axes into the same figure a...

circa 15 ore ago | 0

| accepted

Answered

VLookup Multiple Conditions if statements

No need for a function. Here's a demo with a numeric matrix. See inline comments for details. % Define matrix m = randi(...

VLookup Multiple Conditions if statements

No need for a function. Here's a demo with a numeric matrix. See inline comments for details. % Define matrix m = randi(...

1 giorno ago | 0

Answered

shift horizontal histogram to right

Here's a demo that shows how to compute a probability density estimate for each column of data and how to plot the PDF curve nex...

shift horizontal histogram to right

Here's a demo that shows how to compute a probability density estimate for each column of data and how to plot the PDF curve nex...

1 giorno ago | 1

| accepted

Answered

No data tip interaction when adding a second axis

ax2 is blocking ax1. The datatip on ax2 works fine but there are no data in ax2 so you're not seeing any datatips. Solution: P...

No data tip interaction when adding a second axis

ax2 is blocking ax1. The datatip on ax2 works fine but there are no data in ax2 so you're not seeing any datatips. Solution: P...

1 giorno ago | 0

| accepted

Answered

How do i select a random cell with a certain value from the matrix

% Create matrix of 0s & 1s M = round(rand(1024, 1280)); % List all indices of 1s loc = find(M==1); % Randomly select one o...

How do i select a random cell with a certain value from the matrix

% Create matrix of 0s & 1s M = round(rand(1024, 1280)); % List all indices of 1s loc = find(M==1); % Randomly select one o...

1 giorno ago | 0

| accepted

Answered

how to find the Reverse process of A(B).

A=[1 3 2 4 5 6 7 8 8 9 11]; B=[10 4 3 1 7 6 9 5 2 8 11]; C = A(B); A2(B) = C; However, if B contains duplicate values, ...

how to find the Reverse process of A(B).

A=[1 3 2 4 5 6 7 8 8 9 11]; B=[10 4 3 1 7 6 9 5 2 8 11]; C = A(B); A2(B) = C; However, if B contains duplicate values, ...

1 giorno ago | 1

| accepted

Answered

What is the default figure font in Matlab 2014b?

To get default font properties without the need to create an axes, get(groot, 'defaultAxesFontName') get(groot, 'defaultAxesF...

What is the default figure font in Matlab 2014b?

To get default font properties without the need to create an axes, get(groot, 'defaultAxesFontName') get(groot, 'defaultAxesF...

2 giorni ago | 1

Answered

How to read a matrix line by line in a for loop from a txt file and save it as a 4-dimensional matrix?

No need to use loops! big_matrix1 = permute(reshape(matrix(:,1), [2 7 10 10]), [4,3,2,1]); big_matrix2 = permute(reshape(ma...

How to read a matrix line by line in a for loop from a txt file and save it as a 4-dimensional matrix?

No need to use loops! big_matrix1 = permute(reshape(matrix(:,1), [2 7 10 10]), [4,3,2,1]); big_matrix2 = permute(reshape(ma...

3 giorni ago | 0

| accepted

Answered

How to control color inside a for loop

I haven't dug too deeply into the two threads but I think this will work for you. If not, I'll remove the answer so the questio...

How to control color inside a for loop

I haven't dug too deeply into the two threads but I think this will work for you. If not, I'll remove the answer so the questio...

3 giorni ago | 0

| accepted

Answered

please help me to code below problem

The question mentions "random temperatures" between 0 and 5. Your random values are all integers but random temperatures would ...

please help me to code below problem

The question mentions "random temperatures" between 0 and 5. Your random values are all integers but random temperatures would ...

4 giorni ago | 1

| accepted

Answered

App Designer: Can't delete Figure "app.UIAxes" permanently

This is really bizarre. Source of the problem The problem is caused by the 2nd UIAxes not having a handle assigned in the app...

App Designer: Can't delete Figure "app.UIAxes" permanently

This is really bizarre. Source of the problem The problem is caused by the 2nd UIAxes not having a handle assigned in the app...

4 giorni ago | 1

| accepted

Answered

How can I use sliders to scroll through my data in GUI?

How do I use callbacks to connect all sliders, so they show the same value? You can assign the same callback function to multip...

How can I use sliders to scroll through my data in GUI?

How do I use callbacks to connect all sliders, so they show the same value? You can assign the same callback function to multip...

4 giorni ago | 0

| accepted

Answered

Standard deviation, Mean values for each class

Use grpstats() if you have the Stats & Machine Learning Toolbox. data = [ 1 1 1.5 1.5 2 2; 10 9 7 6 3.5 8]',; [dataMean, data...

Standard deviation, Mean values for each class

Use grpstats() if you have the Stats & Machine Learning Toolbox. data = [ 1 1 1.5 1.5 2 2; 10 9 7 6 3.5 8]',; [dataMean, data...

4 giorni ago | 1

| accepted

Answered

CONFIDENCE INTERVAL FOR A GUMBEL DISTRIBUTION

I checked out the plot using the data you provided. Let me clarify something: the confidence intervals (CI) you're computing a...

CONFIDENCE INTERVAL FOR A GUMBEL DISTRIBUTION

I checked out the plot using the data you provided. Let me clarify something: the confidence intervals (CI) you're computing a...

5 giorni ago | 0

| accepted

Answered

How do I write a loop which creates a random number and adds the previous values

"How do I write a loop which creates a random number and adds the previous values?" To add to the previous value, the loop must...

How do I write a loop which creates a random number and adds the previous values

"How do I write a loop which creates a random number and adds the previous values?" To add to the previous value, the loop must...

5 giorni ago | 1

| accepted

Answered

How can I use a loop to store a table in separate arrays?

The best approach is to not break apart the table and use indexing instead. Tables are neat, tidy, and they keep the data toget...

How can I use a loop to store a table in separate arrays?

The best approach is to not break apart the table and use indexing instead. Tables are neat, tidy, and they keep the data toget...

5 giorni ago | 0

| accepted

Answered

how to add a cell array into an uitable?

cell2str is not a function provided by Matlab. There is more than 1 cell2str function on the file exchange, maybe your code d...

how to add a cell array into an uitable?

cell2str is not a function provided by Matlab. There is more than 1 cell2str function on the file exchange, maybe your code d...

5 giorni ago | 0

Answered

Use Callback function to change string stored in it

Your idea to controll all button colors from a single callback function is a good idea but it can be simplified. The callback ...

Use Callback function to change string stored in it

Your idea to controll all button colors from a single callback function is a good idea but it can be simplified. The callback ...

6 giorni ago | 0

Answered

Error using *equal* when indexing information for creating a structure

It doesn't look like you applied the recommendation correctly. strcmp() returns a logical vector identifying which rows are a...

Error using *equal* when indexing information for creating a structure

It doesn't look like you applied the recommendation correctly. strcmp() returns a logical vector identifying which rows are a...

6 giorni ago | 0

Answered

how to restrict datacursormode in gui to be active only in one axis.

datacursormode toggles the data cursor functionality for an entire figure, not for specific axes. A workaround to controlling ...

how to restrict datacursormode in gui to be active only in one axis.

datacursormode toggles the data cursor functionality for an entire figure, not for specific axes. A workaround to controlling ...

7 giorni ago | 0

| accepted

Answered

GUI - how to set fixed window dimensions

axis equal equates the aspect ratio between the axes so that squares appear as square. When applying this to your gui, provide ...

GUI - how to set fixed window dimensions

axis equal equates the aspect ratio between the axes so that squares appear as square. When applying this to your gui, provide ...

7 giorni ago | 0

| accepted

Answered

Adding matrices rows having the same id

Assuming A and B have the same number of columns, AB = [A;B]; C = [unique(AB(:,1)), splitapply(@(x) sum(x,1), AB(:,2:end), A...

Adding matrices rows having the same id

Assuming A and B have the same number of columns, AB = [A;B]; C = [unique(AB(:,1)), splitapply(@(x) sum(x,1), AB(:,2:end), A...

7 giorni ago | 1

| accepted