Answered

Beginner: Using SURF Function, Error: Z must be a matrix, not a scalar or vector.

A surface is a 3D plot. All your X values are repeated for every Y value, and vice versa, meaning the surface is 5001 x 5001. Su...

Beginner: Using SURF Function, Error: Z must be a matrix, not a scalar or vector.

A surface is a 3D plot. All your X values are repeated for every Y value, and vice versa, meaning the surface is 5001 x 5001. Su...

alrededor de 1 hora ago | 0

Answered

Asterisk wildcard doesn't work with fullfile

I mocked up a folder inside my current directory named "Test02_20200522" with contents "file1_100MVC.otb+" to "file4_100MVC.otb+...

Asterisk wildcard doesn't work with fullfile

I mocked up a folder inside my current directory named "Test02_20200522" with contents "file1_100MVC.otb+" to "file4_100MVC.otb+...

alrededor de 6 horas ago | 0

| accepted

Answered

Segmenting EEG data into 1 second segments

The issue is the curly braces. Use parentheses instead. for i=1:600 tsout(i) = getsampleusingtime(ts,i-1,i); end

Segmenting EEG data into 1 second segments

The issue is the curly braces. Use parentheses instead. for i=1:600 tsout(i) = getsampleusingtime(ts,i-1,i); end

alrededor de 6 horas ago | 0

Answered

How to pass variable from .m file to appdesigner?

I would suggest turning your m-file into a function that returns data as a function output. Then you can call your function from...

How to pass variable from .m file to appdesigner?

I would suggest turning your m-file into a function that returns data as a function output. Then you can call your function from...

alrededor de 18 horas ago | 0

| accepted

Answered

how to count data frequency by year and month?

Easier to help if you share your data. Convert your station name and station code to categoricals. Convert your time to datetim...

how to count data frequency by year and month?

Easier to help if you share your data. Convert your station name and station code to categoricals. Convert your time to datetim...

alrededor de 18 horas ago | 1

Answered

How to make an histogram for month with datetime series, the data is windvelocity for a 1 year?

I don't think you want to do histograms. Try a boxplot instead. Boxplots convey information about the spread of the data, but in...

How to make an histogram for month with datetime series, the data is windvelocity for a 1 year?

I don't think you want to do histograms. Try a boxplot instead. Boxplots convey information about the spread of the data, but in...

alrededor de 19 horas ago | 0

| accepted

Answered

importdata cuts my files in half!

When I open the file you have attached (outside MATLAB), it only contains 2500 rows. Perhaps you meant to attach a different fil...

importdata cuts my files in half!

When I open the file you have attached (outside MATLAB), it only contains 2500 rows. Perhaps you meant to attach a different fil...

alrededor de 19 horas ago | 0

Answered

Find all integer values contained within an irregular volume

I wonder if the functions inpolygon and inpolyhedron might be helpful here. See this post about finding the points inside a 3D v...

Find all integer values contained within an irregular volume

I wonder if the functions inpolygon and inpolyhedron might be helpful here. See this post about finding the points inside a 3D v...

1 día ago | 0

Answered

Bin edges of discretize function excluding some bins

mtransf(102,:) = discretize(mtransf(101,:),binEgdes,"Categorical",catnames); mtransf(102,mtransf(102,:)==4)=NaN;

Bin edges of discretize function excluding some bins

mtransf(102,:) = discretize(mtransf(101,:),binEgdes,"Categorical",catnames); mtransf(102,mtransf(102,:)==4)=NaN;

1 día ago | 0

| accepted

Answered

Find/return value from each row in a big matrix that corresponds with a condition/value

Is the order of the resulting vector important? You can just do a normal equality comparison, then use any to create a logical ...

Find/return value from each row in a big matrix that corresponds with a condition/value

Is the order of the resulting vector important? You can just do a normal equality comparison, then use any to create a logical ...

1 día ago | 0

Answered

How to make a new matrix out of the combination of 12 matrix

use indexing. A = zeros(401,101); B = ones(401,101); C = [A(:,[1 3 5]), B(:,[10 20 20])];

How to make a new matrix out of the combination of 12 matrix

use indexing. A = zeros(401,101); B = ones(401,101); C = [A(:,[1 3 5]), B(:,[10 20 20])];

1 día ago | 0

Answered

Exporting matrix as .txt file

The best approach would be to define a variable for each format specified in your fprintf statement. Without it, MATLAB, which i...

Exporting matrix as .txt file

The best approach would be to define a variable for each format specified in your fprintf statement. Without it, MATLAB, which i...

2 días ago | 0

Answered

How to reorganize the data in table?

Use groupsummary. Group the data first by E then by M. Groupsummary will tell you the count of each group. Here's an example usi...

How to reorganize the data in table?

Use groupsummary. Group the data first by E then by M. Groupsummary will tell you the count of each group. Here's an example usi...

2 días ago | 1

| accepted

Answered

AppDesigner GUI Inexplicably Moving Components

I was able to open and close your app several times without seeing the issue you are describing. If you are still seeing it, I s...

AppDesigner GUI Inexplicably Moving Components

I was able to open and close your app several times without seeing the issue you are describing. If you are still seeing it, I s...

3 días ago | 0

| accepted

Answered

Read data from editing text in GUI

Keep in mind variable scope for functions. Look at the inputs to your function rhs function dxdt=rhs(t,x) The handles structur...

Read data from editing text in GUI

Keep in mind variable scope for functions. Look at the inputs to your function rhs function dxdt=rhs(t,x) The handles structur...

3 días ago | 0

Answered

undefined variable even with equal sign, tried to see if it was the () but no luck

EVS is only defined in the case where n>=3 (btw, you don't need the parentheses around n and 3). What is your value of n? If it'...

undefined variable even with equal sign, tried to see if it was the () but no luck

EVS is only defined in the case where n>=3 (btw, you don't need the parentheses around n and 3). What is your value of n? If it'...

3 días ago | 0

Answered

Plotting graph with excel file

We'll have to make some assumptions, since we don't have all the details. I'm going to assume your data is in a table with 3 va...

Plotting graph with excel file

We'll have to make some assumptions, since we don't have all the details. I'm going to assume your data is in a table with 3 va...

5 días ago | 0

| accepted

Answered

Scaling of one axis only in 2D plot

Set the position property. See this post.

Scaling of one axis only in 2D plot

Set the position property. See this post.

5 días ago | 0

| accepted

Answered

I need an established reference on optimizing Matlab code.

Not sure if this is what you are looking for, but here are some resources I'm aware of: MATLAB Performance Optimization Perfor...

I need an established reference on optimizing Matlab code.

Not sure if this is what you are looking for, but here are some resources I'm aware of: MATLAB Performance Optimization Perfor...

6 días ago | 0

| accepted

Answered

Add text to column numbers in variables editor

I'm fairly certain only tables can have named columns. A similar post can be seen here.

Add text to column numbers in variables editor

I'm fairly certain only tables can have named columns. A similar post can be seen here.

6 días ago | 0

| accepted

Answered

How to prepare imagedatastore for Image to single value regression

Let's fix the error first. What is Y_train? Converting it to categorical is simple enough. Y_train = categorical(Y_train); Wit...

How to prepare imagedatastore for Image to single value regression

Let's fix the error first. What is Y_train? Converting it to categorical is simple enough. Y_train = categorical(Y_train); Wit...

6 días ago | 0

Answered

detecting and removing eye blinks from 4-channel EEG signal

We don't have nearly enough information to help you. However, you might try using the Find Local Maxima and Minima task in the l...

detecting and removing eye blinks from 4-channel EEG signal

We don't have nearly enough information to help you. However, you might try using the Find Local Maxima and Minima task in the l...

7 días ago | 0

Answered

Z must be a matrix, not scalar or vector

z needs to be the same size as X and Y. Perhaps you mean to do something like this? t=linspace(0, 2*pi); T = meshgrid(t); x=2...

Z must be a matrix, not scalar or vector

z needs to be the same size as X and Y. Perhaps you mean to do something like this? t=linspace(0, 2*pi); T = meshgrid(t); x=2...

7 días ago | 1

| accepted

Answered

How to remove first 19 rows from a multidimensional cell array

Use a cellfun. % Setup A(1)={rand(100,10)}; A(2)={rand(100,11)}; A(3)={rand(100,10)}; A(4)={rand(100,15)}; % Remove firs...

How to remove first 19 rows from a multidimensional cell array

Use a cellfun. % Setup A(1)={rand(100,10)}; A(2)={rand(100,11)}; A(3)={rand(100,10)}; A(4)={rand(100,15)}; % Remove firs...

7 días ago | 0

| accepted

Answered

RE-use helper function on multiple GUI components

Since the app structure is a structure, you can dynamically set the field names. There are a couple ways you could do it. Here's...

RE-use helper function on multiple GUI components

Since the app structure is a structure, you can dynamically set the field names. There are a couple ways you could do it. Here's...

7 días ago | 1

| accepted

Answered

How to make a zoom in y map in MATLAB Visualizations Custom

Can you add this to your code? geolimits([-12.210 -11.923],[-77.306 -76.936])

How to make a zoom in y map in MATLAB Visualizations Custom

Can you add this to your code? geolimits([-12.210 -11.923],[-77.306 -76.936])

7 días ago | 0

Answered

Offline execution of a program in MATLAB online

You need to maintain an active connection or your session will time out. See Hisham's reply here.

Offline execution of a program in MATLAB online

You need to maintain an active connection or your session will time out. See Hisham's reply here.

7 días ago | 0

Answered

For loop is not working

A loop runs the same code over and over. That means you overwrite your variables each time. As you've written it, the result wil...

For loop is not working

A loop runs the same code over and over. That means you overwrite your variables each time. As you've written it, the result wil...

7 días ago | 0

Answered

overlaying 3 contourf plots into 1 figure.

All 3 contourf plots are there. You can verify this with the plot browser. You do only see the one that was plotted last. The le...

overlaying 3 contourf plots into 1 figure.

All 3 contourf plots are there. You can verify this with the plot browser. You do only see the one that was plotted last. The le...

8 días ago | 0

| accepted

Answered

Put data into bins with pre-specified intervals

Use histcounts and specify the bin edges using the syntax [N,edges] = histcounts(X,edges)

Put data into bins with pre-specified intervals

Use histcounts and specify the bin edges using the syntax [N,edges] = histcounts(X,edges)

8 días ago | 0

| accepted