Community Profile

photo

Cris LaPierre

MathWorks

Last seen: Today Active since 2018

Statistics

All
  • 36 Month Streak
  • Community Group Solver
  • Thankful Level 4
  • Most Accepted 2021
  • Ace
  • Revival Level 4
  • Solver
  • Knowledgeable Level 5
  • First Answer

View badges

Content Feed

View by

Answered
switches with the < and > operators
A switch statement executes the first case that is true. Try this instead. x = 12; switch true case x < 3 % sta...

17 hours ago | 2

Answered
rounding elements in matrix if > or < to 0.75
Currently, round uses 0.5 as the threshold. The quickest solution would be to modify your data by subtracting 0.25 to artificial...

17 hours ago | 1

Answered
How can I change values in a table using a function and using the values in the function (if-function)?
Use logical indexing. footangle = [-10.55;8.864;-12.801;168.63;-170.196;165.661;-167.901;175.266;12.006;-10.485]; TableName = ...

17 hours ago | 0

| accepted

Answered
Select rows of different vector that matches a specific condition
A=[0.25; 0.30; 0.20; 1.5; 1.3]; B=[1; 1.30; 2.0; 3.5; 4.0]; C=[-3; 0.25; 0.85; 1.2; -0.70]; row = (1:length(C))'; ind = A>...

18 hours ago | 0

| accepted

Answered
Hi i have the next error in the code and idk why cause all the parameters are vectors.
You've stripped away everytihg that would help us be more specific, but the error is stating that the 2nd and 3rd inputs to nlmp...

1 day ago | 0

| accepted

Answered
How to vectorize the multiple loops
Are u1 and u0 always zero arrays? If so, you can simplify your code to the following. % set up the initialization params a_b =...

2 days ago | 0

Answered
Get data out of a struct to manipulate
Extract the data using the structurename.fieldname syntax. See here: https://www.mathworks.com/help/matlab/matlab_prog/create-a-...

4 days ago | 0

Answered
Convert day of year to UTC format?
T = ["2012-259T01:53:15.50194"; "2012-259T01:53:16.50194"]; T = datetime(T,'InputFormat','uuuu-DDD''T''HH:mm:ss.SSSS...

4 days ago | 1

| accepted

Answered
I want to know why im getting an error in my code to calculate distance
You haven't defined the variables you are using in your calculations. Define values for v,theta,ga,h0, & xd and your code will r...

4 days ago | 0

| accepted

Answered
Filled countour plot for a specific value
See this example in the documentation, which just displays the contour at z=2: https://www.mathworks.com/help/matlab/ref/contour...

5 days ago | 0

| accepted

Answered
Array indexing in a function - working in R2018a but not in R2021a
That error is most likely a result of not including 'global bands' in your calling script. You appear to have only added it to y...

5 days ago | 1

Answered
mean and some in each row, col is not correct.
If you attach your data set, perhaps we can be more helpful. In the meantime, you might find the "Performing Group Calculations"...

5 days ago | 0

Answered
Is it possible to 3D print a 3D function plotted in Matlab?
I would point you to this post: https://www.mathworks.com/matlabcentral/answers/623773-how-to-generate-a-stl-file-starting-from-...

5 days ago | 0

Answered
Is it possible to 3D print a 3D function plotted in Matlab?
Your syntax for stlwrite is not correct. It should be stlwrite(TR,filename) However, the input triangulation must be a triangul...

6 days ago | 0

Answered
Matlab 2023a installation fails
Contact support: https://www.mathworks.com/support/contact_us.html

7 days ago | 0

Answered
How colorize bars in bar3 plot in single color based on height?
See this answer: https://www.mathworks.com/matlabcentral/answers/1947248-plot-3d-plot-with-different-colors-depending-on-the-x-...

7 days ago | 0

| accepted

Answered
Can someone please check my code and tell me what is the issue with it?
The issue is due to a combination of things: leaving a space between a function name and its inputs combined with building an ar...

7 days ago | 0

Answered
How to use niblack file exchange?
This is not something creating by MathWorks. The only information I could find is in the help of each function. %NIBLACK local ...

7 days ago | 0

Answered
Index exceeds the number of array elements. Index must not exceed 0.
The error means your variable is empty. a = []; a(1)

7 days ago | 0

Answered
Index exceeds the number of array elements. Index must not exceed 1
This error means you are trying to index an element that does not exist in your variable. Here, your variables are ll scalars, b...

8 days ago | 0

| accepted

Answered
How to start using Mars program with Matlab
You can place the folder anywhere you want. You just need to add the folder and subfolders to your MATLAB Search Path. See this ...

8 days ago | 0

| accepted

Answered
Like to have input user command for cases
You could use a switch-case statement A case can be used for multiple criteria. switch x case {1,2,3} %code ...

8 days ago | 0

Answered
please, how can i make the plot on the x axis from 15 to 25 hertz to rest on the x axis. that is to make them start from zero. i have used detrend but, it is not working
This is likely due to the resolution of your data. The signal is not able to capture everything, so over time, the error accumul...

8 days ago | 0

| accepted

Answered
How to replace NaN values with 0 of a GRIDobject?
The TopoToolbox is not created by MathWorks. A quick look at the list of toolbox functions leads me to suggest looking into the...

9 days ago | 0

Answered
How to get sample datasets locally? [Documentation error?]
Beginning in R2023a, the product documentation is no longer installed by default (see here). The side effect of this is that som...

9 days ago | 1

| accepted

Answered
In AppDesigner, how to input a CSV file using a checkbox?
Looks like you might want to use uigetfile in the checkbox callback function.

11 days ago | 0

| accepted

Answered
3-D figure
Sure. Here's an eample of a cone along the Z axis. Use the 'FaceAlpha' name-value pair to adjust transparency: https://www.math...

11 days ago | 1

| accepted

Answered
MATLAB Online deleted the contents of my file and has no back up
The only option I can think of is to check the contents of your deleted files folder in MATLAB Drive: https://drive.matlab.com/...

12 days ago | 0

Answered
Plot a Line of best fit onto a previously made graph that contains subplots
You must make the axes current first, then turn hold on. subplot(m,n,p) ... If axes exist in the specified position, then this...

12 days ago | 0

| accepted

Answered
As you can see in the script I made 2 plot commands. However, there is nothing shown on the graphs. The display results is accurate, but I would like to have the graphs shown.
It is likely the variable you are plotting is a scalar (only has one value). In order to see a line, you must plot at least 2 po...

12 days ago | 0

Load more