Community Profile

# Cris LaPierre

### MathWorks

2.093 total contributions since 2018

#### Cris LaPierre's Badges

View details...

Contributions in
View by

Plotting symbolic equation in matlab
Try creating your symbolic equation using the approach shown in the examples here. syms eq(x) eq(x) = (sin(sqrt(x)+5)*exp(sqrt...

alrededor de 21 horas ago | 0

| accepted

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...

2 días ago | 0

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...

2 días ago | 0

[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...

2 días ago | 1

| accepted

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...

2 días ago | 0

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 ...

2 días ago | 0

| accepted

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...

2 días ago | 0

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...

2 días ago | 1

| accepted

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...

2 días ago | 0

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...

2 días ago | 2

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 ...

3 días ago | 0

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...

3 días ago | 0

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 ...

4 días ago | 0

| accepted

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...

4 días ago | 0

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...

4 días ago | 1

| accepted

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...

5 días ago | 0

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...

5 días ago | 0

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...

6 días ago | 0

| accepted

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. ...

6 días ago | 1

| accepted

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...

6 días ago | 0

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...

6 días ago | 0

| accepted

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...

6 días ago | 0

| accepted

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...

6 días ago | 0

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...

6 días ago | 0

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...

6 días ago | 0

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...

7 días ago | 0

| accepted

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...

7 días ago | 0

| accepted

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...

7 días ago | 0

| accepted