Answered

How to exclude weekend data from an excel sheet in matlab?

You have mixed data in your columns, so the way I would do this is as follows. Use readtable to load the first two rows. I'm go...

How to exclude weekend data from an excel sheet in matlab?

You have mixed data in your columns, so the way I would do this is as follows. Use readtable to load the first two rows. I'm go...

environ 4 heures ago | 1

| accepted

Answered

how to get the value from .mlapp file in .m file and after some processing in .m file again return to .mlapp file to display the result on GUI interface

What you are describing is a function. You can read about the basics here. You can add a function in app designer. See this pag...

how to get the value from .mlapp file in .m file and after some processing in .m file again return to .mlapp file to display the result on GUI interface

What you are describing is a function. You can read about the basics here. You can add a function in app designer. See this pag...

1 jour ago | 0

Answered

365 day loop for 59 years

Make sure your dates are datetimes. Then you can take advantage of the dates and time functions. Here's a rought outline. star...

365 day loop for 59 years

Make sure your dates are datetimes. Then you can take advantage of the dates and time functions. Here's a rought outline. star...

1 jour ago | 0

Answered

Custom Flight Log - change datatype

Look at the example. The data there is also orginally a double. timeAccess = @(x)seconds(1/x.Fs*(1:size(x.IMU))); Here, the se...

Custom Flight Log - change datatype

Look at the example. The data there is also orginally a double. timeAccess = @(x)seconds(1/x.Fs*(1:size(x.IMU))); Here, the se...

1 jour ago | 0

Answered

Check if Lat, Lon coordinate fall inside a polyshape Polygon

I think your inputs to inpolygon need to be the points. Try using the inputs to polyshape. inpolygon can test a vector of query ...

Check if Lat, Lon coordinate fall inside a polyshape Polygon

I think your inputs to inpolygon need to be the points. Try using the inputs to polyshape. inpolygon can test a vector of query ...

2 jours ago | 0

Answered

Simplifying 4 for loops into one

Why not just put it all in one loop? listCGS = nan([5 1]); listMGS = nan([5 1]); listHouse = nan([5 1]); listMat = nan([5 1]...

Simplifying 4 for loops into one

Why not just put it all in one loop? listCGS = nan([5 1]); listMGS = nan([5 1]); listHouse = nan([5 1]); listMat = nan([5 1]...

2 jours ago | 0

| accepted

Answered

Group data in bins

In that case, i would look into grpstats or groupsummary. You might also be interested in using findgroups in conjunction with s...

Group data in bins

In that case, i would look into grpstats or groupsummary. You might also be interested in using findgroups in conjunction with s...

2 jours ago | 0

Answered

Copying and pasting in matlabonline

Copy/paste does not appear in the rt click context menu. You should be able to use the appropriate keyboard shortcuts for your s...

Copying and pasting in matlabonline

Copy/paste does not appear in the rt click context menu. You should be able to use the appropriate keyboard shortcuts for your s...

2 jours ago | 0

Answered

Interpolating missing values according to time vector

Sure. You just have to separate your knowns and unknowns. x=[2 6 8 10 NaN NaN NaN NaN 21 59 NaN 12 80]'; time=[738097.24, 7380...

Interpolating missing values according to time vector

Sure. You just have to separate your knowns and unknowns. x=[2 6 8 10 NaN NaN NaN NaN 21 59 NaN 12 80]'; time=[738097.24, 7380...

2 jours ago | 1

| accepted

Answered

Reading the numeric columns from a mixed data type file

Look into readtable. Tables support mixed data types, and will use the headers as the variable names. You could also use the Im...

Reading the numeric columns from a mixed data type file

Look into readtable. Tables support mixed data types, and will use the headers as the variable names. You could also use the Im...

3 jours ago | 0

Answered

HOW TO PLOT DATA BASED ON DATA IN ANOTHER COLUMN

What type of plot do you want? If a scatter plot, use gscatter. % Create data A=[randi(2,100,1),rand(100,1),rand(100,1)]; A=s...

HOW TO PLOT DATA BASED ON DATA IN ANOTHER COLUMN

What type of plot do you want? If a scatter plot, use gscatter. % Create data A=[randi(2,100,1),rand(100,1),rand(100,1)]; A=s...

3 jours ago | 0

Answered

Creating an array from a matrix based on if statement outputs

As my opinion, based on what you have described, I would not use a for loop or an if statement. Doing so does not take advantage...

Creating an array from a matrix based on if statement outputs

As my opinion, based on what you have described, I would not use a for loop or an if statement. Doing so does not take advantage...

3 jours ago | 0

Answered

Group data in bins

The first output of histcounts is the count of items in each bin. You could use this syntax to at least determine which bin ea...

Group data in bins

The first output of histcounts is the count of items in each bin. You could use this syntax to at least determine which bin ea...

3 jours ago | 0

Answered

PROBLEM ANIMATING SURF PLOT

You are only modifying t. If you want something to change in another direction, you will have to modify the corresponding variab...

PROBLEM ANIMATING SURF PLOT

You are only modifying t. If you want something to change in another direction, you will have to modify the corresponding variab...

4 jours ago | 0

Answered

How to continue an if statement after using the switch function

Right now, your second if statement is part of the otherwise case of the switch statement. If you want it to execute after the s...

How to continue an if statement after using the switch function

Right now, your second if statement is part of the otherwise case of the switch statement. If you want it to execute after the s...

4 jours ago | 1

| accepted

Answered

Reading text file in Matlab

I wonder if it would make more sense to try to use the OpenEarthtools toolbox rather than try to create your own input function....

Reading text file in Matlab

I wonder if it would make more sense to try to use the OpenEarthtools toolbox rather than try to create your own input function....

5 jours ago | 0

| accepted

Answered

legend() has an issue with 'Selected' or 'selected'

The problem here is that 'selected' is being interpreted as the name of a name-value pair. Change you legend labels to a cell a...

legend() has an issue with 'Selected' or 'selected'

The problem here is that 'selected' is being interpreted as the name of a name-value pair. Change you legend labels to a cell a...

5 jours ago | 0

| accepted

Answered

Creating a function that prints the first multipliers of any number

https://www.mathworks.com/help/matlab/matlab_prog/create-functions-in-files.html https://www.mathworks.com/help/matlab/ref/func...

Creating a function that prints the first multipliers of any number

https://www.mathworks.com/help/matlab/matlab_prog/create-functions-in-files.html https://www.mathworks.com/help/matlab/ref/func...

5 jours ago | 0

Answered

A function that receives a vector and and returns specific metrics

https://www.mathworks.com/help/matlab/matlab_prog/create-functions-in-files.html https://www.mathworks.com/help/matlab/ref/func...

A function that receives a vector and and returns specific metrics

https://www.mathworks.com/help/matlab/matlab_prog/create-functions-in-files.html https://www.mathworks.com/help/matlab/ref/func...

5 jours ago | 0

Answered

How do I make my bar3h work as intended?

A bar plot colors by series, not by height of the bar. If you remove the caxis command, you will see the colors correspond to th...

How do I make my bar3h work as intended?

A bar plot colors by series, not by height of the bar. If you remove the caxis command, you will see the colors correspond to th...

5 jours ago | 0

| accepted

Answered

ERROR:NOT ENOUGH INPUT ARGUMENT IN LINE n = length(y);

Based on what you've shared, you are trying to take the length of a variable that doesn't yet exist (y). That would give a diffe...

ERROR:NOT ENOUGH INPUT ARGUMENT IN LINE n = length(y);

Based on what you've shared, you are trying to take the length of a variable that doesn't yet exist (y). That would give a diffe...

5 jours ago | 0

Answered

Legend And Plot Disagree

The problem is related to yClassical being a matrix instead of a vector. When using ones, if you only specify one input value, n...

Legend And Plot Disagree

The problem is related to yClassical being a matrix instead of a vector. When using ones, if you only specify one input value, n...

5 jours ago | 1

| accepted

Answered

Using "fit" function to create a fit type and fit a curve with a function I created

There is a subtle detail made in this example. Define a function in a MATLAB file. Save the file. To use the approach you are...

Using "fit" function to create a fit type and fit a curve with a function I created

There is a subtle detail made in this example. Define a function in a MATLAB file. Save the file. To use the approach you are...

5 jours ago | 1

| accepted

Answered

Can someone help me with this error message: Error using vertcat Dimensions of arrays being concatenated are not consistent. ? My code is attached below

This error occurs when you try to combine (stack) vectors with different number of columns. a=1:3; b=2:8; c=[a;b] Check that...

Can someone help me with this error message: Error using vertcat Dimensions of arrays being concatenated are not consistent. ? My code is attached below

This error occurs when you try to combine (stack) vectors with different number of columns. a=1:3; b=2:8; c=[a;b] Check that...

5 jours ago | 0

Answered

How to detect which type of data user selected 'text' or 'excel' file via "uigetfile" and then perform further code?

Use this syntax of uigetfile [file,path,indx] = uigetfile Here, indx corresponds to what filter was selected (see here). If th...

How to detect which type of data user selected 'text' or 'excel' file via "uigetfile" and then perform further code?

Use this syntax of uigetfile [file,path,indx] = uigetfile Here, indx corresponds to what filter was selected (see here). If th...

5 jours ago | 1

| accepted

Answered

Import a spreadsheet with columns containing both string and numeric values using readtable()

In this instance, MATLAB has selected a numeric data type for the column. You can use the optoins to change the data type used t...

Import a spreadsheet with columns containing both string and numeric values using readtable()

In this instance, MATLAB has selected a numeric data type for the column. You can use the optoins to change the data type used t...

5 jours ago | 0

| accepted

Answered

Help with writing Assessments for Script-Based Learner Solutions

I would suggest looking at the Assessment section of the Add Problem documentation page. If you have not done so already, I wou...

Help with writing Assessments for Script-Based Learner Solutions

I would suggest looking at the Assessment section of the Add Problem documentation page. If you have not done so already, I wou...

5 jours ago | 0

Answered

How to import all sheets of excel file with "UIgetfile" option?

Use uigetfile to select the file. Then use that name in your second code to import all the sheets. Maybe something like this (un...

How to import all sheets of excel file with "UIgetfile" option?

Use uigetfile to select the file. Then use that name in your second code to import all the sheets. Maybe something like this (un...

5 jours ago | 1

| accepted

Answered

Use input(prompt) in a Matlab Grader question

It is not possible to build problems that interact with the user (input, for example). You could consider creating a function-t...

Use input(prompt) in a Matlab Grader question

It is not possible to build problems that interact with the user (input, for example). You could consider creating a function-t...

5 jours ago | 0

Answered

how can I add a empty columns and lines to my table?

See this answer: https://www.mathworks.com/matlabcentral/answers/350073-how-to-add-blank-columns-to-table

how can I add a empty columns and lines to my table?

See this answer: https://www.mathworks.com/matlabcentral/answers/350073-how-to-add-blank-columns-to-table

5 jours ago | 1