Community Profile

photo

Cris LaPierre

MathWorks

Last seen: Today Active since 2018

Statistics

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

View badges

Content Feed

View by

Answered
Removing trailing end characters in a table
You could use extractBefore and strlength. This works with string data, so I import text as stings. data = readtable('https://w...

etwa 17 Stunden ago | 1

| accepted

Answered
Have a table with three prompts per date and want to split it up
I would look into stack and unstack functions. Share your data, and we might be able to provide more help. You can save it to a ...

etwa 18 Stunden ago | 0

| accepted

Answered
Adding a point on a quiver graph.
You would just use an additional plot command to add the point(s) you want with the desired marker. For example load('wind','x'...

5 Tage ago | 0

| accepted

Answered
How to read comma separated .txt file in MATLAB ?
I would use the settings available in readmatrix to make the '=' a delimiter. That will treat the '#A-R' as another column of da...

5 Tage ago | 0

| accepted

Answered
When using ind2rgb, how do you use map as output argument?
It is the colormap to apply to your indexed image. See here. The indeces in the indexed image indicate which row of the colormap...

6 Tage ago | 1

Answered
Expected one output from a curly brace or dot indexing expression, but there were 3 results.
You just need to explore your structure to understand what is happening. You have 3 NodeSets in your structure. The indexing you...

6 Tage ago | 1

| accepted

Answered
Plot EEG signals from struct
Sampling frequency allows you to determine the time each sample (column) of data was collected. You have 3,000,000 samples per ...

6 Tage ago | 0

| accepted

Answered
Why doesn't the patch command fill homogeneously the region between two arrays?
The issue I see is with how you are defining your patch inputs. Your x is a row vector, so the semicolon adds the flipped values...

6 Tage ago | 0

| accepted

Answered
find rows in a matrix where all the elements (of those rows) are not NaN
I would use Logical indexing. a = [ NaN NaN NaN NaN NaN NaN NaN ...

6 Tage ago | 1

| accepted

Answered
"Invalid training data. Predictors and responses must have the same number of observations"
Note that, in the image you shared, they also all collapse back to a single node. My suspicion, then, is that you would use the ...

6 Tage ago | 1

| accepted

Answered
How can I import excel file (.xlsx) in Matlab and store the 4th column in a vector?
Use readtable with the following syntax to read the data into a table: T = readtable(___,Name,Value) To just read the 4th colu...

6 Tage ago | 0

Answered
"Invalid training data. Predictors and responses must have the same number of observations"
I believe the problem is due to the fact that Xtrain is a cell array. I would replace your for loop with the following code inst...

7 Tage ago | 0

Answered
Matlab Online missing add-ons
I would recommend contacting support.

7 Tage ago | 0

Answered
Export Data to Excel Error:
I am able to reproduce the error in R2018b. This appears to be an issue that has been fixed in newer versions of MATLAB. Any cha...

7 Tage ago | 1

Answered
create static method in app designer
I'm assuming you want a static method so that the first input does not have to be an object of the class. The way I could do thi...

8 Tage ago | 0

Answered
Datetime won't recognise some cells
For miliseconds, you want to use a capital 'S'. load datetime-problem.mat datetime(databackup.TimeofDay,'Format','HH:mm:ss.s...

9 Tage ago | 1

| accepted

Answered
Can't edit problems in MATLAB Grader with Apple Safari
Please contact support.

9 Tage ago | 0

Answered
How to clear all EditFields in App Designer that were dynamically generated
The code you need is in the solution you link to. % delete all labels and edit fields delete(app.TypeOfPlyLabels); delete(app...

10 Tage ago | 0

Answered
How to set map limits on mapshow?
I wonder why you are using shaperead instead of readgeotable for your Expot.shp file. I would create the desired map with impose...

10 Tage ago | 1

| accepted

Answered
reading data from text file
Use readtable (use column headers as variable names) or readmatrix (will need to skip the first row) instead.

10 Tage ago | 1

Answered
Help ME ! Error in feature input layer in CNN, Number of observations in X and Y disagree
I see the error in this line: 'ValidationData',{xVal,yVal'}); % ^ You are transposing yVal. Assuming...

12 Tage ago | 1

| accepted

Answered
fileread txt file problem
Consider looking into readtable or readmatrix instead of textscan. % if you want column 5 format long g file = 'https://www.m...

12 Tage ago | 0

| accepted

Answered
Index exceeds the number of array elements (0).
You are trying to index a variable that has no elements. a = [] a(1)

12 Tage ago | 0

Answered
what can we use when we dont have value in a matrix instead of 0?
use nan? data = rand(3); data(2,3) = nan You could also use missing, especially if you are usure of the data type. The result...

12 Tage ago | 0

| accepted

Answered
How can I get this code to work? I am trying to fit the equation that contains step and delta function to experimental data. But I am getting the following error.
The problem is that your objective function is returning NaN values. It is specifically the exp and sinh parts of the equation. ...

13 Tage ago | 1

Answered
What does a(a<0) = 0 mean in matlab?
Yes, it works on arrays. It is using logical indexing to assign values to a. You can learn more about logical indexing in Ch 11 ...

14 Tage ago | 0

| accepted

Answered
Plot Label, Tile and Legend at the same time of the live plot
I would rearrange your code to set everythign up before entering the for loop, and then in the loop, just update the plot data. ...

14 Tage ago | 1

| accepted

Answered
extracting data using indexing
See Ch 5 of MATLAB Onramp

15 Tage ago | 0

Answered
Why doesn't Matlab recognize my data format?
The error is because 2018 was not a leap year. 2016 and 2020 were. d1 = '29/02/2016'; datetime(d1) % The error you see d2 = ...

15 Tage ago | 0

Answered
how do I display the labelling on the axis?
The issue is caused by the code that adjusts the axes position. Comment that out, and your axes labels appear. % CGLsim1D.m %...

15 Tage ago | 0

| accepted

Load more