Community Profile

photo

Cris LaPierre


Last seen: Today

MathWorks

1,628 total contributions since 2018

Cris LaPierre's Badges

  • 12 Month Streak
  • Guiding Light
  • Thankful Level 2
  • Revival Level 4
  • Solver
  • Knowledgeable Level 4
  • First Answer

View details...

Contributions in
View by

Answered
How to turn a script into a function so later i can make the code executable with Matlab Coder
+1 to what Rik said. However, this is a good opportunity to point out that the MATLAB live editor now has the capability of co...

28 minutes ago | 0

Answered
Colorbar doesn't match with contourf plot
I believe the issue is that this data set doesn't lend itself well to a contour plot. 98.6% of the data is <10 or NaN. Your lowe...

1 hour ago | 1

Answered
Index exceeds array bounds in BVP problem
Because i exceeds the length of Y_gHMX. I see your index relates to the values you extracted from Y_gHMX_. However, once extrac...

3 hours ago | 0

Answered
Code Segment works in Command Window but not in script
Appears to work just fine. Do you define X or theta somewhere in your script with different dimensions? Perhaps clear your works...

1 day ago | 0

| accepted

Answered
-If else- conditionals in matlab app.designer?
Because your check of the menu value returns a value for each character, not one. a='ac'; a=='ac' You can use a single &, and...

1 day ago | 1

Answered
how to reset drop down list(go to first option) when pushing any other button in App designer
In the callbacks for those other buttons, add the following code. app.DropDown.Value = app.DropDown.Items(1);

1 day ago | 0

Answered
Animating plot in a for loop
Use the animatedline function. Follow this example from the documentation.

1 day ago | 0

| accepted

Answered
Adding a value to a vector
The same way. What have you tried? See Ch 6 of MATLAB Onramp. x=[ 1 2 3 ]; x=x + 4

1 day ago | 1

Answered
Diff function: How to calculate the difference of two values
Syntax error. See the doc page. You are asking it to take the diff of 12.22 13.22 times. All the values you want to take the dif...

1 day ago | 1

Answered
Error using findpeaks Expected Y to be one of these types: double, single Instead its type was table.
Best to use variable you define rather than ans. The function readtable returns a table. Each column of a table is, in turn, a...

2 days ago | 0

| accepted

Answered
Plot a 3d domain with colors determined by 3d array
I would use the following syntax for scatter3 scatter3(X,Y,Z,S,C) Note that if C is a vector with length equal to the length o...

2 days ago | 1

Answered
How to: sum up elements of a row vector into bins of a matrix
With a little creativity, you can use groupsummary. Since you haven't shared enough of your code to use that for an example, her...

2 days ago | 0

Answered
Change/Add License Administrator
https://www.mathworks.com/matlabcentral/answers/101101-how-do-i-change-the-administrators-on-my-license

2 days ago | 0

Answered
Index exceeds number of array elements (1)
You might find the explanation I gave in this post helpful.

2 days ago | 0

| accepted

Answered
How do I convert a double into a cell array?
You can use num2cell. Use the transpose operator to convert a 30x1 to a 1x30. a=(1:5)' b=num2cell(a')

2 days ago | 0

| accepted

Answered
create a plot with two y - axis where the second one is just a reference scale.
I provided this solution for a similar request in add designer. Remove any "app." and "app.UIAxes," and it should work.

2 days ago | 0

Answered
How to save a specific workspace variable instead of the entire workspace
save(filename,variables)

2 days ago | 1

| accepted

Answered
Using drop-down list selection to plot
There is no DropDown.Item.Value property. See this page for more. There is a DropDown.Items property. This is everything the d...

3 days ago | 0

| accepted

Answered
Highlight a data point on graph using slider
My recommendation would be to create you highlight at the intial value of the slider at the same time you plot. Be sure to captu...

3 days ago | 0

| accepted

Answered
How to change font in legend while using latex interpreter
It does not appear to be possible to change the font. You can get roman or italic using \mathrm{} or \mathit{} respectively. I ...

3 days ago | 0

Answered
How do I debug this code?
Preallocation messages are code analyzer warnings, not errors. They are tips to improve your code, but will not prevent it from ...

3 days ago | 0

Answered
How Matlab to support of controlling Parrot-ANAFI drone?
See this post: https://www.mathworks.com/matlabcentral/answers/495235-will-matlab-support-the-parrot-anafi-in-r2020a

3 days ago | 0

Answered
Limits must be a 2-element vector of increasing durations.
You are plotting a variable of data type duration as x. Therefore, your axis is made up of durtions. The xlim values you use mus...

3 days ago | 0

| accepted

Answered
Using diff() to identify the two values with the highest difference.
You could write your own function to do this. However, I'm not aware of anything that does this already. Especially since you ar...

3 days ago | 1

Answered
App Designer: Error using readtable "filename" must be a string scalar or character vector.
I suspect the error is with how you are indexing you file names. First, what is fileList? Shouldn't you be using the files that...

3 days ago | 0

| accepted

Answered
How to use the function triplot to plot an stl file in a specific axis inside App Designer?
When plotting in app designer, you need to tell the plotting function what axes to plot into. Although the documentation for tri...

3 days ago | 0

Answered
From .m file to app designer
The best place to get started is the Getting Started with App Designer page. Once you have watched that, go to the doc page on d...

3 days ago | 0

Answered
I cannot share my MATLAB online files to others.
You can only share folders in MATLAB Drive, not individual files. The sharing can be done in MATLAB Online or MATLAB Drive onlin...

3 days ago | 0

| accepted

Answered
bug in the function
What is ETA? You cannot use a variable you have not defined. Perhaps you think this variable is loaded by data.mat, but appare...

3 days ago | 0

Answered
How to do curve fitting on data with inflection point?
Why do you think there is no equation that can fit this data? This looks like a sigmoid E max model to me. A similar shape is ob...

3 days ago | 0

| accepted

Load more