Community Profile

# Cris LaPierre

### MathWorks

1,025 total contributions since 2018

View details...

Contributions in
View by

Convert a map in shapefile into occupancy map
Thank you for sharing your shapefile. The first thing to realize is that your shapefile's X and Y data contains data for 9 polyg...

6 hours ago | 0

Need help parsing text from .txt file
One way to skip a specific line in a file is to read it line by line and check the contents first. Here's a quick example using ...

12 hours ago | 0

Index in position 1 is invalid. Array indices must be positive integers or logical values.
Your values are not integers. For example, what value should rat_ink(79.7,1) return? Valid indices are 1, 2, 3, etc.

1 day ago | 0

Change scale of second y-axis on figure
Use the ylim function to set the yaxis limits.

1 day ago | 0

Error using sin Not enough input arguments
sin is a function, which means you must give it an input. The error here is with the code sin*t at the end of your expression. D...

1 day ago | 0

Convert a map in shapefile into occupancy map
I'll take the "offer a tip" route. That means I may not know what I'm talking about. I have some familiarity with shapefiles, b...

4 days ago | 0

How to find average value of every 10 numbers within a set of numbers?
The problem is how you set up your loops. The first value of i is the length of speed, 452. The first value of j is trying to i...

4 days ago | 0

Using text, 2 variables, and decimals in fprintf
The documentation page is a great place to start. There, you'll see that the variables have to come at the end. Also, you don't ...

5 days ago | 0

Try catch error function not working
Your code must generate an error in the 'try' portion before it will execute what is in the catch. I don't see any reason why th...

5 days ago | 1

Help me to Solve ODE problem
Check your equations. Sr is always zero. This causes cst to always be zero, which then causes drdt to also be zero, causing dRdt...

5 days ago | 0

| accepted

How can I read data from excel file consecutively rather than taking random numbers ?
Maybe I don't understand your question, or you don't understand your code. Your code tells it to load a random file, and then c...

5 days ago | 0

What is the name of the variable you are loading? That is a fieldname in the structure kost. You access it using dot notation: ...

5 days ago | 0

Extract X,Y data from scatter plot
Assuming you have a *.fig file and not a .png, first open the fig file in MATLAB then run the following code. s=findobj(gca,'Ty...

5 days ago | 0

| accepted

Array dimensions must match for binary array op.
The code runs just find for me. I don't have 'lake.tif', but I don't think that should matter. Try clearing your workspace or r...

5 days ago | 0

| accepted

Saving data in separate folders under different file names
I notice the lengh of the vector used for i is 90, but the length of Filename is 88. I suspect what is happening is that, when y...

5 days ago | 0

| accepted

Unrecognized variable x error
What is the value of n? The most obvious thing to me is that your for loop doesn't actually run, so x is never created. The lo...

5 days ago | 0

| accepted

Matlabonramp 13.2.
"Toggle" means to switch between to states (on/off, yes/no, in/out, show/hide, etc). A Further Practice section is an area to p...

8 days ago | 0

| accepted

plot 4 plots on 3 axes
Start by looking into yyaxis. As for adding a 3rd y-axis, see if this post helps.

10 days ago | 0

Datevector conversion from Excel to Matlab

10 days ago | 0

| accepted

How can I to convert a cell to a double without losing the leading zeros?
I believe you would have to keep it a string in order to pad with zeros up front. See this post.

11 days ago | 0

Adding latex text to a curve in a matlab plot
Try using the text function and set the 'Interpreter' name-vale pair to 'latex'.

11 days ago | 0

| accepted

App Designer - Button group
See this post.

14 days ago | 0

When I look at your file, it looks to be fixed-width, but you seem to have two different data sets combined here. The indicator ...

15 days ago | 2

How to open csv file?

15 days ago | 1

comparing table values using isequal
This can be done much simpler. Try something like this. A = M(M{:,2}=="f",:);

16 days ago | 1

| accepted

How to solve "Unable to perform assignment because the indices on the left side are not compatible with the size of the right side" error?
x(j) is a single array element. You are trying to assign it 3 values, [dis0; phi0; theta0]. I'm unsure what the intent is, but o...

16 days ago | 0

| accepted

How can I count all occurances of each date in a DateTime Array?
I would look into groupsummary. Like Adam suggests, you'll need to remove the time portion for it to work as you intend. % Simp...

17 days ago | 1

| accepted