Community Profile

photo

Cris LaPierre


Last seen: Today

MathWorks

1,865 total contributions since 2018

Cris LaPierre's Badges

  • 12 Month Streak
  • Guiding Light
  • Thankful Level 2
  • Revival Level 4
  • Solver
  • Knowledgeable Level 4
  • First Answer

View details...

Contributions in
View by

Answered
how to read the data byte by byte in .raw file?
See the documentation for fread (Read data from binary file). There are some examples on that page that should help you get star...

16 hours ago | 0

Answered
MATLAB Associate Certification information
You can find the information and links to answer your questions in this answer: https://www.mathworks.com/matlabcentral/answers...

1 day ago | 0

Answered
How to take input from Edit Text Field and load the data with Push Button
I'd be wary of having manual name entry. See this answer on how to use uigetfile. https://www.mathworks.com/matlabcentral/answe...

1 day ago | 0

Answered
ODE45 - problem with parameters passed in odefcn
I found this example helpful: https://www.mathworks.com/help/matlab/ref/ode45.html#bu3uhuk I think you need to set up your odef...

1 day ago | 1

| accepted

Answered
How to assign a colour to particular value and rest of the values have their standard colours
One solution I can think of is to replace all zeros with NaN. In a contour plot, NaNs display as white. Z=meshgrid(-0.1:0.001:0...

1 day ago | 0

Answered
how to plot contour lines on Joint Histogram plot
I'll share a couple thoughts about how I would try to approach this. In order to create a contour plot, MATLAB requires the inp...

2 days ago | 0

| accepted

Answered
Contour plot of bivariate distributions from XY data (not independent)?
Definitely not an expert when it comes to this, but this sounded interesting so I thought I'd take a stab at it. I found the Plo...

2 days ago | 1

| accepted

Answered
How to fix error: "Index in position 1 is invalid. Array indices must be positive integers or logical values"
You need to incorprate a method that restricts your indices to the resolution of the pixels of your image. I find min and max wo...

3 days ago | 0

Answered
How do I get index matrix for matrix of values?
Now I'm confused, too. You've now posted two completely different types of index matrices. Perhaps instead, could you explain ho...

3 days ago | 1

| accepted

Answered
how can i download Psychtoolbox?
The second command will take a long time and may generate a lot of output. Please be patient. If the download fails, read below...

3 days ago | 0

Answered
Unable to add uicontrol to uifigure
Try using uieditfield instead of uicontrol. See here.

3 days ago | 0

| accepted

Answered
errors in sortrow in matlabr2020
When I run your code, your variable sol is empty. This is why it is throwing an error. You are asking it to sort by column 8, bu...

3 days ago | 0

Answered
Readability of matlab code
I would not recommend global variables. Perhaps look into nested functions. All variables defined in the parent function are a...

3 days ago | 0

Answered
Plotting two lines in 3d
Look into plot3.

3 days ago | 0

Answered
How to create 3d figures as follows
Once you know the property names, it's just a matter of setting the desired value. It does seem your equation creates a differen...

3 days ago | 1

| accepted

Answered
How can I plot x,y,z position of particles over time from a multidimensional array?
Based on my understanding, here's how I would approch this. I swapped your for loops so that it selects a particle, and then wor...

3 days ago | 0

| accepted

Answered
How do I convert the vector to matrix 16 * 16
Use reshape inv_s_vox = reshape(1:256,[16,16])

4 days ago | 0

| accepted

Answered
Why it shows that index exceeds the number of array elements???
You must have a variable defined as either mean, var, or std. Clear your workspace and try again. areas = [5176 5183 5165]; ar...

4 days ago | 1

Answered
Streamlines do not plot
I think this is causing your streamlines to not show up startx=zeros(size(starty)) Based on the example in the documentation, ...

4 days ago | 0

Answered
How to force a matlab script to rerun the script from the beginning using list items and if statement?
Scripts execute from top to bottom. MATLAB does not have a GOTO command. However, you can accomplish this by reorganzing your co...

4 days ago | 1

| accepted

Answered
How to show the bin' percentage values' in a histogram?
The issue is with how you defined your binranges. When you don't specify a step size, the colon operator uses 1. binranges = -0...

4 days ago | 0

| accepted

Answered
Why wont the lines on my plot show up
I think the issue is that you are using a vector in the conditional statement of your if statement. An if statement expects a si...

4 days ago | 0

Answered
Scatter plot customization question
Your third input is specifying the marker size. scatter(x,y,sz) Perhps a better choice might be a group scatter plot. Here, yo...

4 days ago | 0

Answered
readtable, excel, date base
Perhaps with the DatetimeType name value pair. You can find details in the Name-Value Pair Arguments section of the documentatio...

5 days ago | 0

Answered
Forming a matrix from data
To put elements on separate rows, you can either put a semicolon between the numbers, or enter them on separate lines. You have ...

5 days ago | 0

| accepted

Answered
Convert string array to numerical vector
Use str2double A = ["01";"04";"12"]; B = str2double(A)

5 days ago | 0

| accepted

Answered
how to use legend syntax properly
I think you might not understand what a legend is. Have a look at the documentation. It sounds like you want xlabel and ylabel...

5 days ago | 0

| accepted

Answered
How to create calcium traces of individual neurons and club them together in one representation (see image for reference)?
Look into stackedplot, or tiledlayout. If you are new to MATLAB, you may also benefit by going through MATLAB Onramp.

5 days ago | 0

| accepted

Answered
How do I turn this 4x1 table to 60x1? It says "To assign to or create a variable in a table, the number of rows must match the height of the table."
You are trying to assing a table to a single element, resulting in the image. Perhaps you want to concatenate the tables on top ...

5 days ago | 0

Answered
change start point of plot
You can change the first point's y value from 105 to 0. d=datetime(2020,1,1):calmonths:datetime(2020,12,1); y = randi(160,[1,1...

5 days ago | 0

Load more