Community Profile

Cris LaPierre

MathWorks

Last seen: Today Active since 2018

All

Content Feed

View by

Array indices must be positive integers or logical values.
Are you getting a warning instead of an error? If so, this means the code still runs, but MATLAB is warning of possible ways to ...

ongeveer 5 uur ago | 0

Remove rows from a table if a variable with the same name in another table does not exist
Have you tried using the Join Tables live task? This will interactively let you align two tables using key variables. Once you h...

ongeveer 5 uur ago | 0

Output in two columns
Because k=1:(numPort-1) and numPort=3

ongeveer 5 uur ago | 0

Running an older version of app designer in a new one

ongeveer 5 uur ago | 0

Problem in working with ismembertol
LIA = ismembertol(A,B) uses a default tolerance of 1e-6 for single-precision inputs and 1e-12 for double-precision inputs. Try ...

ongeveer 5 uur ago | 0

ODE45 producing NaN values for a set of differential equations
Your numerator and denominators are both 0. And 0/0 = NaN x=[0 0 0 0 0 0]; r0 = 1; L = 2.5; k = 353160*2; m1 = 3500/2; m2 ...

ongeveer 24 uur ago | 0

Why my plot is blank?
The most likely reason is that V and Tr are a single number. By default, MATLAB does not plot using markers, so if there is only...

2 dagen ago | 1

bar chart group and stack
The bar function doesn't contain a simple way to accomplish this, but perhaps this post in the file exchange does what you want?...

3 dagen ago | 0

Converting time to a epoch
In MATLAB, you can read this in as a duration (see options here) using readtable. It may autodetect the time correctly. If not, ...

3 dagen ago | 0

How do you allow the user to select a line in a GUI and change the color?
There is no built-in way to do this that I am aware of. However, your lines appear to be fairly horizontal. Capture the handle...

3 dagen ago | 0

how to store values from loop in vector
See Ch 13 of MATLAB Onramp (Programming) for an interactive introduction to using for loops. You can also find some examples of ...

3 dagen ago | 0

| accepted

Plotting with a for loop
If your variables y,z,a & b are column vectors (and if they are not, you could easily make them column vectors), you could do th...

3 dagen ago | 0

| accepted

Weekly retime grouping by ID on large dataset
Look into groupsummary. You can group by multiple variables. % groupsummary MeasurementTime = datetime({'2015-11-11';'2015-11-...

3 dagen ago | 0

plot function not working
You have saved the script containing your code as 'plot.m'. However, that is the same name as the plot function in MATLAB. Give...

4 dagen ago | 0

Can we rotate the plot(x, y)
You could reverse your x and y inputs. Use -x to make the triangle point up. for w=0.5:0.1:1 l = w; thet = 0:1:60; theta = t...

4 dagen ago | 0

| accepted

Finding the column and row
One feature of a table is that your columns can be different data types (e.g. a double and a cell). In a matrix, all your data ...

6 dagen ago | 0

How do you capitalize the first and the third letter of each word in a sentence?
There are different ascii codes for lowercase and uppercase letters (https://www.ascii-code.com/, see codes 65-122). I suspect t...

6 dagen ago | 0

Related to importing a stl file in matlab
You would need to use stlread to load an STL file into MATLAB. Once in, you can use the view function to see specific camera ang...

6 dagen ago | 0

How to plot quivers only on pixels with an intensity greater than 0?
quiver will not plot nan, so a simple solution may be to replace any value of 0 with nan. U(U==0)=nan; V(V==0)=nan; quiver(X,...

7 dagen ago | 1

| accepted

what function should I use in order for the matlab to evaluate the entered number if it is proper fraction, improper fraction, or Whole number?
You appear to be using MATLAB Grader, which does not support user interactions like input. You will need to find a different way...

7 dagen ago | 0

I am getting an error Index exceeds the number of array elements in the following code. Kindly help me out with this problem.
We don't have enough information to tell you which variable is causing the problem. However, one of your variables has less than...

7 dagen ago | 0

| accepted

Convert list of indices to array
You should be able to use the reshape command on the 4th column % Setup your matrix syms e31 e15 e32 e24 e33 a= [1, 1, 1, 0...

7 dagen ago | 1

| accepted

Parse Error, usage might be invalid MATLAB Syntax
All functions must be at the bottom of your script. See here: https://www.mathworks.com/help/matlab/matlab_prog/create-function...

8 dagen ago | 0

changing values in an array
See Ch 5 of MATLAB Onramp (Indexing into and Modifying Arrays). You will also find Ch 12 (Logical arrays) helpful for what you ...

8 dagen ago | 0

| accepted

Unable to Rename Columns of Table
The reason the first one isn't working is because you have a typo. Look at how you spell eclipses ecplises = ... eclipses.Prop...

9 dagen ago | 1

| accepted

creating line plot with different marker color and legends
Your data is a row vector (1xn) but you are indexing it like it is a column vector (mx1). Since it is a vector, perhaps it is be...

9 dagen ago | 0

| accepted

set axes limit manual
Ah, you actually meant 11x11 and 20x20. I had figured that was just a typo based on the question. imagesc is going to use row nu...

10 dagen ago | 0

set axes limit manual
Can you share your code? It sounds like you are not providing an x input to your plot command. If not, MATLAB is using the index...

10 dagen ago | 0