Community Profile

photo

Cris LaPierre


Last seen: Today

MathWorks

1,650 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
problem in the for - loop
Why would you expect them to be the same? When you get around to calculation res_y1(i), Y2 has the value of y2(length(y1)). If ...

9 hours ago | 0

Answered
Help with an error when calling a function
It would appear either one of your for loops is not executing, or your if statement Square_Prediction == 1 is never true. When t...

10 hours ago | 0

| accepted

Answered
Cannot link my MathWorks account to MATLAB Grader in my LMS
This sounds like an issue with your account. Please contact MathWorks support.

13 hours ago | 0

Answered
Convert cell array to vector
T = load('timestamps.mat'); % Convert to a string array ts = string(T.ans); % Convert strings to durations ts = duration(t...

16 hours ago | 1

Answered
Setting up time and date
Not sure I fully understand, but try this for setting up you time vector. tVec = today('datetime')+hours(13:.5:24.5)'

18 hours ago | 0

| accepted

Answered
"Save as type" option does not exist in "MATLAB Online R2020b"
The Save As dialog in desktop MATLAB gives you the following options for Save as Type. In MATLAB Online, the Save button pres...

18 hours ago | 0

Answered
Share Matlab Grader Collection from LMS
It is currently only possible to share collections created on the MATLAB Grader site. In order to share problems that were crea...

18 hours ago | 1

Answered
putting a plot as different slices on an axis
One thought is to create your geometry using patches, which allow you to specify a z coordinate. pgon1 = [-0.5 -0.6882; 0.5 -0...

1 day ago | 1

Answered
Plotting multiple graphs on each subplot
You are getting the second plot, but only one data point of it, so it's being plotted as a point. However, since you do ot speci...

1 day ago | 0

| accepted

Answered
Different colors for scatter plot points based on the difference of x-y values
You will need to come up with a vector that contains the values you want to use to set the color of the points. Once you have th...

1 day ago | 1

| accepted

Answered
Creating a Table with rows labeled from a matrix and exporting it into an excel file
See this post. If you want row times, you might be interested in created a timetable instead of a table. We don't have your s...

1 day ago | 1

| accepted

Answered
Loop how to sum part of matrix
Reshape your matrix to a 3x3x3 and then sum along the 3rd dimension.

1 day ago | 0

Answered
2D contour plot from XYZ data
Creating 2D contours from xyz values

1 day ago | 0

Answered
Looping matrice index at a specific interval, probably with mod
You could do something like this. This loop just creates an array showing the results. Each row would be the indices to use for ...

2 days ago | 1

| accepted

Answered
Index exceeds the number of array elements (1).
You can follow the steps provided in this answer to determine the issue.

2 days ago | 0

Answered
Index in position 1 exceeds array bounds (must not exceed 28).
I suspect the error is here: NLD(i,3) Position 1 is indexed by i. Since you are using a while loop, check what the value of i i...

3 days ago | 0

Answered
30 most frequent words with more than 4 letters in a text file
See the Analyze Text Data with String Arrays example.

3 days ago | 1

Answered
Running a for loop with breaks
First point - you are not using ginput. You are using ginputc, which is a function obtained on the file exchange. From the desc...

3 days ago | 0

Answered
how to solve not enough argument on the bold one?
You can delete the bolded line. [N,r]=size(X); It is not necessary. N and r are defined about 10-15 row above, and those are t...

3 days ago | 0

Answered
Reversing parts of (even) items in a listbox (cellarray)
You can use mod to determine if the last number is even or not. I would then use indexing to reverse the order of the rows that ...

3 days ago | 0

| accepted

Answered
How can I create a 2D contour Plot from X,Y,Z table?
The first issue is that one of your inputs to griddata is symbolic. It must be numeric. Use the double function to convert Qs1 t...

3 days ago | 1

| accepted

Answered
Where may I find documentation for the Day Count Convention actual/actual (basis value 0) from the Financial Toolbox
I believe it's described on the yearfrac documentation page. An explanation of the basis input is found here.

3 days ago | 0

| accepted

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

3 days ago | 0

| accepted

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

3 days 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 days ago | 0

| accepted

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

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

5 days 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);

5 days ago | 0

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

5 days 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

5 days ago | 1

Load more