Community Profile

photo

Cris LaPierre

MathWorks

Last seen: Today Active since 2018

Statistics

All
  • 24 Month Streak
  • Ace
  • Thankful Level 2
  • Revival Level 4
  • Solver
  • Knowledgeable Level 4
  • First Answer

View badges

Content Feed

View by

Answered
Number of points inside polygon is returning 0 but should be a bigger number
In line 114 of the code you have shared, you have reversed your lat (you name it Y) and lon (you name it X) data. Flip those, an...

3 hours ago | 0

| accepted

Answered
How do I select specific rows in a 1x15 matrix?
See Ch 5 of MATLAB Onramp (indexing into and modifying arrays)

6 hours ago | 0

Answered
Fractional expression to decimal expression in symbolic function
See this answer Summary: use vpa(x,d) or use digits

7 hours ago | 0

Answered
How do I watch demo video without flash player on my company PC?
The getting started with MATLAB content has moved oniine. The main getting started page for MATLAB (similar to your screenshot) ...

7 hours ago | 0

Answered
Unrecognized function or variable
You start your script with 'clear all', so no variables exist in your workspace. Then in your 5th line of code, you try to use y...

10 hours ago | 0

Answered
How to perform Double Sum with the help of loops?
See the nested for loop example on the for documentation page. BTW, if i+j=3, then there is no double summing necessary, right?...

11 hours ago | 0

Answered
"Array indices must be positive integers or logical values." - a new problem
What are your input values for First and Last? What are the values for vlength1 and vlength2? The error means you are trying to...

12 hours ago | 0

Answered
Only the final iteration in the loop is saved. How to save all the iterations ? * Note: all are displayed, but not saved except the last *
You need to use indexing to assign your angles to a different element of Angles each loop. Right now, you overwrite Angles every...

13 hours ago | 0

Answered
How to plot shapes in one figure
Use hold on https://www.mathworks.com/help/matlab/ref/hold.html

13 hours ago | 0

Answered
How do I convert a group of 3x3 matrices that are contained in a 3xN array, into a 3x3xN/3 array?
MATLAB uses column-major order by default, which means the data is organized internally as if the columns were stacked head-to-t...

13 hours ago | 1

| accepted

Answered
Problem with drawline and drawpoint in 2021b
What is happening is that drawline is registering the click on the canvas (i.e. it is not limiting clicks to when the cursor is ...

15 hours ago | 0

Answered
what changes can I make so that all files are selected automatically
uigetfile does not have an option that automatically selects all files. Consider using uigetdir instead of uigetfile. You can th...

17 hours ago | 0

Answered
I have been working on this code. But it's kept showing me this error. Please help me
You likely just need to enter the function code into MATLAB Grader

1 day ago | 0

Answered
How to fix: Index Exceeds Matrix Dimensions.
I placed your code inside an infinite while loop and ran it for 15 minutes and no errors occurred. Perhaps there is some additio...

3 days ago | 0

Answered
Everything being the same, then why does matrix C give different values in the two codes?
Because they are not the same? Your output should be [size(A, 1)*size(B, 1), size(A, 2)*size(B, 2)] See the More About > Kroen...

3 days ago | 0

Answered
How to solve a double complex ode using ode45 in MATLAB
You can solve a symbolic ODE with initial/boundary conditions using dsolve S = dsolve(eqn,cond)

3 days ago | 0

Answered
Hi, I am stuck on simscape onramp course task 5 of 'feeback control (practice)'. I've tried don't exactly what the solution says and it won't work. The error is
In the meantime, consider trying what was suggested in this post: Do tasks 1-5 as instructed. All that is correct. Before runni...

3 days ago | 1

Answered
In table, replace NaN with Text (from NaN to "ABCD")
NaN suggests you have numeric data in your column (Not A Number). You will have to convert your numeric values to strings if you...

4 days ago | 0

Answered
datenum on array of values - specifying the format
You do not need to enter a format if your data is already a datetime. The 'FormatIn' flag should only be used if your date is a ...

4 days ago | 0

Answered
Translate a music sheet into MATLAB code
In music, notes are just sine waves at a specific frequency played for a specific amount of time. Any quiet time can be achieved...

4 days ago | 0

Answered
Adding boundary condition to dsolve argument
I'm no expert here, so take this for what it is worth. You mention needing to set a condition. Does the Solve Differential Equ...

5 days ago | 1

| accepted

Answered
one common y label for the subplots
If you use tiledlayout instead of subplot, you can add shared title and axis labels. See this example. t = tiledlayout(2,2,'Til...

5 days ago | 1

| accepted

Answered
Index exceeds the number of array elements (1).
The error means you are trying to index a vector/array element that does not exist in your variable. Specifically, your error me...

5 days ago | 0

Answered
run part of a function file
Use breakpoints to pause execution at a specific line in your function. See here: https://www.mathworks.com/help/matlab/matlab_...

5 days ago | 0

Answered
How would I write this code?
What is month? You are using it as a variable. However, if you have not defined it as a variable, then MATLAB is trying to cal...

5 days ago | 1

Answered
Undefined function or variable 'cell2str'.
That is not a function created by MathWorks, but you can get it here from File Exchange.

5 days ago | 0

Answered
i want to draw a triangle with vertices on 3 axis, how to do it? and also how to draw a incircle in it?
You could just use plot3. Just remember to close the loop. plot3([1,0,0,1], [0,1,0,0], [0,0,1,0]) If you want it filled in, yo...

5 days ago | 1

Answered
Vector not updating in while loop
It is replacing the current value of pipe with the new value. It sounds like you instead want to create a vector. See Ch 13 of M...

5 days ago | 0

Answered
There is an apparent error in line 4, and this code only ran once
The issue I see is that you are using b in line 4 to calculate c2, but do not define b until line 9. Perhaps you just need to re...

6 days ago | 0

Answered
Stacking more than 200K files (same #columns)
Consider using a datastore. You can see an example in our Importing Multiple Data Files video from our Practical Data Science wi...

6 days ago | 0

Load more