Answered

wrong matrix - provides 3x3 instead of 3x1

Follow the dimensions of your variables to track it down. Q_bar{k} is 3x3 Q_bar{k} = inv(T).*Q.*T where Q and T are 3x3 shear...

wrong matrix - provides 3x3 instead of 3x1

Follow the dimensions of your variables to track it down. Q_bar{k} is 3x3 Q_bar{k} = inv(T).*Q.*T where Q and T are 3x3 shear...

18 hours ago | 0

Answered

how to plot polyfit same plot as scatter

Look at some of the examples on the polyval documentation page. Polyfit just returns the coefficient values. If you want to plo...

how to plot polyfit same plot as scatter

Look at some of the examples on the polyval documentation page. Polyfit just returns the coefficient values. If you want to plo...

18 hours ago | 0

Answered

[Beginner] Constructing a rectangle object and detecting points inside

Independently, I'd suggest the rectangle and inpolygon functions. However, to find the points inside the rectangle, I'd use patc...

[Beginner] Constructing a rectangle object and detecting points inside

Independently, I'd suggest the rectangle and inpolygon functions. However, to find the points inside the rectangle, I'd use patc...

18 hours ago | 1

| accepted

Answered

In table, how to select values in one column based on values in another column?

The simplest way to do this is using logical indexing, but that doesn't preserve the order. That makes it a more challenging pro...

In table, how to select values in one column based on values in another column?

The simplest way to do this is using logical indexing, but that doesn't preserve the order. That makes it a more challenging pro...

18 hours ago | 0

Answered

Selecting part of data that satisfies a criterion

You seem to be taking the correct approach. Perhaps the most helpful thing to point out is this page on how to access data in a ...

Selecting part of data that satisfies a criterion

You seem to be taking the correct approach. Perhaps the most helpful thing to point out is this page on how to access data in a ...

21 hours ago | 0

| accepted

Answered

Algorithm that identifies the number of time steps in which a matrix has certain values?

If you use a live script, you also can develop your own algorithm to find the points you want interactively using the Find Local...

Algorithm that identifies the number of time steps in which a matrix has certain values?

If you use a live script, you also can develop your own algorithm to find the points you want interactively using the Find Local...

22 hours ago | 0

Answered

Marker color on web browser matlab

Have you looked at the Color section of the wmmarker documentation page? Color must use the convention explained on the Colorsp...

Marker color on web browser matlab

Have you looked at the Color section of the wmmarker documentation page? Color must use the convention explained on the Colorsp...

1 day ago | 0

Answered

Help!: int(expr,var) function returns the int(expr,var) function

That likely means it couldn't solve that one. Consider using one of the techniques mentioned in these two examples. Unevaluate...

Help!: int(expr,var) function returns the int(expr,var) function

That likely means it couldn't solve that one. Consider using one of the techniques mentioned in these two examples. Unevaluate...

1 day ago | 0

Answered

How to make lines plotted as dots for discontinuous data more visible in legend?

As I'm sure you are aware, a legend matches the formatspec of the corresponding line object. Since you plot without a line, your...

How to make lines plotted as dots for discontinuous data more visible in legend?

As I'm sure you are aware, a legend matches the formatspec of the corresponding line object. Since you plot without a line, your...

1 day ago | 2

Answered

Index exceeds the number of array elements(3)

We can't run your code. We need your closetozeroroundoff function. However, the error message isn't about whether or not there ...

Index exceeds the number of array elements(3)

We can't run your code. We need your closetozeroroundoff function. However, the error message isn't about whether or not there ...

1 day ago | 0

Answered

Unrecognized function or variable 'visadevlist'.

These functions are part of the Instrument Control Toolbox. You need to have that toolbox installed in order to use these functi...

Unrecognized function or variable 'visadevlist'.

These functions are part of the Instrument Control Toolbox. You need to have that toolbox installed in order to use these functi...

1 day ago | 0

Answered

How to access output variables from a m.file in another?

If the variables exist in your workspace, you can use them in any script. Consider having one script that organizes your data ...

How to access output variables from a m.file in another?

If the variables exist in your workspace, you can use them in any script. Consider having one script that organizes your data ...

2 days ago | 0

Answered

Where is the problem with this code?

Inspect your response variable. It apparently has the wrong data type. If you don't yet know how to create categorical data, se...

Where is the problem with this code?

Inspect your response variable. It apparently has the wrong data type. If you don't yet know how to create categorical data, se...

3 days ago | 0

Answered

Solving a first order differential equation

See this example. I've copied/modified the relevant parts below. syms y(t) Dy = diff(y,t); cond = Dy(2)==3; ySol(t) = dsolve...

Solving a first order differential equation

See this example. I've copied/modified the relevant parts below. syms y(t) Dy = diff(y,t); cond = Dy(2)==3; ySol(t) = dsolve...

3 days ago | 1

| accepted

Answered

Correction of misspelled words in data source

If you are using extractAfter, your data must be text. If so, have you tried using the replace function? data = ["Signal1: 5, S...

Correction of misspelled words in data source

If you are using extractAfter, your data must be text. If so, have you tried using the replace function? data = ["Signal1: 5, S...

4 days ago | 0

Answered

How to read text header data from a csv file along with numerical data

Use readtable with VariableNamingRule set to true. Then extract the data you need from the table. T = readtable('test.csv',"Var...

How to read text header data from a csv file along with numerical data

Use readtable with VariableNamingRule set to true. Then extract the data you need from the table. T = readtable('test.csv',"Var...

4 days ago | 0

Answered

STILL confused on Solver (tried a different approach) NOT SPAM

Assuming x is symbolic %feed composition z1=.5; z2=.1; z3=.15; z4=.25; %other given data F=150; PD=250; T=10; sy...

STILL confused on Solver (tried a different approach) NOT SPAM

Assuming x is symbolic %feed composition z1=.5; z2=.1; z3=.15; z4=.25; %other given data F=150; PD=250; T=10; sy...

5 days ago | 0

| accepted

Answered

How do I plot one legend item for multiple plots?

One approach I can think of is to check even/odd before you plot, and use line objects to control what is placed in the legend. ...

How do I plot one legend item for multiple plots?

One approach I can think of is to check even/odd before you plot, and use line objects to control what is placed in the legend. ...

5 days ago | 1

| accepted

Answered

error at for loop end (courseera course ref. solution- fixed points Lorentz equations)

I wonder if the variable b defined in the first line is supposed to be beta. However, changing that just led to a new error. If...

error at for loop end (courseera course ref. solution- fixed points Lorentz equations)

I wonder if the variable b defined in the first line is supposed to be beta. However, changing that just led to a new error. If...

5 days ago | 0

Answered

Unable to detect datetime or duration data using readtimetable with a seconds index

The issue appears to be that seconds get written in a format that MATLAB cannot read back in. The only supported input formats f...

Unable to detect datetime or duration data using readtimetable with a seconds index

The issue appears to be that seconds get written in a format that MATLAB cannot read back in. The only supported input formats f...

5 days ago | 0

| accepted

Answered

Setting default XLimitMethod not working

That would explain it. This appears to be a new property that was added in R2021a. https://www.mathworks.com/help/matlab/ref/ma...

Setting default XLimitMethod not working

That would explain it. This appears to be a new property that was added in R2021a. https://www.mathworks.com/help/matlab/ref/ma...

5 days ago | 0

| accepted

Answered

2D line graph plotting from calculations

Right now, each loop replaces the previous variable values with the new values. Insteach, you need to capture the result of each...

2D line graph plotting from calculations

Right now, each loop replaces the previous variable values with the new values. Insteach, you need to capture the result of each...

5 days ago | 0

Answered

Return field in struct whose field name contains a string

One way is to use the functions fieldnames and contains. Struct.Data.FieldOne =1;%1000x2 double Struct.Data.FieldTwo =2;%1000x...

Return field in struct whose field name contains a string

One way is to use the functions fieldnames and contains. Struct.Data.FieldOne =1;%1000x2 double Struct.Data.FieldTwo =2;%1000x...

5 days ago | 0

Answered

graphing x as a function of y, y as a function of x in one plot

You would benefit by going through MATLAB Onramp. Ch 3 covers creating vectors and matrices Ch 6 covers array calculations (el...

graphing x as a function of y, y as a function of x in one plot

You would benefit by going through MATLAB Onramp. Ch 3 covers creating vectors and matrices Ch 6 covers array calculations (el...

5 days ago | 0

Answered

How to retrievre the code that generates a figure?

Unfortunately, no, information on which file was used to create a figure is not captured. Perhaps you could use Date Created and...

How to retrievre the code that generates a figure?

Unfortunately, no, information on which file was used to create a figure is not captured. Perhaps you could use Date Created and...

6 days ago | 0

| accepted

Answered

Error using string concatenation as input to ordinal( ) function

There is a warning at the top of the documentation page for ordinal The nominal and ordinal array data types are not recommende...

Error using string concatenation as input to ordinal( ) function

There is a warning at the top of the documentation page for ordinal The nominal and ordinal array data types are not recommende...

6 days ago | 0

| accepted

Answered

Vectors not the same length

If there are less items in Speed then Time, then your if statement should use length(Speed) instead. However, that may not alway...

Vectors not the same length

If there are less items in Speed then Time, then your if statement should use length(Speed) instead. However, that may not alway...

6 days ago | 0

| accepted

Answered

Name timetable values based on datetimes defining time range

You may find the page Access Data in a Table helpful.

Name timetable values based on datetimes defining time range

You may find the page Access Data in a Table helpful.

6 days ago | 0

Answered

Heatmap from Array For data set

If you want to keep everything as vectors, you will need to turn your array into a table with at least 3 variables. Then create ...

Heatmap from Array For data set

If you want to keep everything as vectors, you will need to turn your array into a table with at least 3 variables. Then create ...

6 days ago | 0

Answered

How to show multiple lines in the legend?

You are replacing the legend each time. Use the loop to build up your labels, but don't atually create the legend until you exit...

How to show multiple lines in the legend?

You are replacing the legend each time. Use the loop to build up your labels, but don't atually create the legend until you exit...

6 days ago | 0