Answered
I have a for loop of 800000 iterations, it graphs some data everytime the module of this data divided by 1000 is 0, I need the graph to have multiple of the graphed curves.
Your code works for me, although I had to build up a lot of the surrounding code, inferring what it should be from what you said...

3 years ago | 1

| accepted

Answered
histogram of datetimes with customisable bin width
By taking the diff of a, your variable b is now a duration, not a datetime. That means your binWidth must be of the same datatyp...

3 years ago | 1

Answered
Rescaling the x axes and y axes for each plot separately?
Add an call to the axis function in each subplot with the desired X and Y scaling using the syntax: axis(limits) For example, ...

4 years ago | 1

| accepted

Answered
How to call an equation with dependent variables in a function
The error is because D1 is a scalar, not a vector. It also does not appear to be a function of theta. So use D1 instead of D1(i)...

4 years ago | 0

| accepted

Answered
Is it possible to generate dynamic text in Matlab Live Script notebooks?
This is not currently possible. If you'd like, you can submit this to MathWorks as a suggestion https://www.mathworks.com/suppo...

4 years ago | 0

Answered
how to crop images 3D
Why not just do this h = imstack3(:,:,1:10) Since this is a 3D image, you could also try using imcrop3. h = imcrop3(imstack3,...

4 years ago | 0

| accepted

Answered
3D plot using data from table
See the Access Data in Tables page. I recommend using dot notation: tblNm.varNm

4 years ago | 0

Answered
converting a variable in a table from cell to double
Your variable is a cell because many of your values are '---'. Try this t1.foE = str2double(t1.foE);

4 years ago | 0

Answered
Unrecognized function or variable 'nc_varget'.
How are you loading and reading in the netCDF file? Without seeing your code, it's hard to say what this error means. However, t...

4 years ago | 0

| accepted

Answered
How to remove a certain value from all entries of a vector
You might consider using the Remove Trends live task if you are working in a live script. This is limited to removing polynomial...

4 years ago | 0

Answered
How can I plot outliers and original data together?
Wouldn't plotting the original data already contain the outliers? I assume you want to plot each group with a different linespec...

4 years ago | 0

Answered
How to extract table rows based on a column entry (string) which match a pattern?
You can use MATLAB's pattern matching functions (I like contains for this application). The table you shared does not contain an...

4 years ago | 1

| accepted

Answered
Range of x and y
Use the axis command after creating your plot. axis([-2 2 -5.5 5.5])

4 years ago | 0

| accepted

Answered
Need to create a movie of vector plots
You are using linear indexing to extract values from upiv and wpiv, which will return a single value. Do you mean to do this ins...

4 years ago | 1

Answered
Data not plotting as a 'stacked' bar chart?
You are creating your bar plot with 18 differing X values, and a corresponding Y value for each. For a stacked plot, see this ex...

4 years ago | 1

| accepted

Answered
Provide feedback when answering correctly in MATLAB Grader
As you have observed, feedback is only shown to students if the assessment test is incorrect. The only feedback they will see is...

4 years ago | 0

| accepted

Answered
Timestamp in ISO 8601 to yyyy-MM-dd HH:mm:ss
I would follow this example: Date and Time from Text with Literal Characters DateStrings = {'2014-05-26T13:30-05:00';'2014-08-2...

4 years ago | 0

Answered
ODE initial condition other than 0
See this answer: https://www.mathworks.com/matlabcentral/answers/12730-initial-conditions-on-ode45#answer_17409

4 years ago | 0

| accepted

Answered
How to join multiple Excel files of varying lengths
Here's something based on using fileDataStore. This assumes your data is numeric, as it uses readmatrix to load the data from yo...

4 years ago | 1

| accepted

Answered
Live Tex Variable Updates the Whole Script Despite Run Option Set to "Current Section"
Your script does not have any sections in it, so the whole script runs each time. You must add a section break before your Bellm...

4 years ago | 0

| accepted

Answered
Saving multiple single vectors in one Matlab file
You overwrite your variable C in each loop, and you overwrite C.mat as well, so the final contents are just what was created in ...

4 years ago | 0

| accepted

Answered
How to give one x and y axis label when using tiled layout('flow')?
Use the xlabel and ylabel functions with the first input being your tiled layout object. The code below is taken from this examp...

4 years ago | 1

| accepted

Answered
How can I get the average data of the combined csv files?
I would use a datastore to load all the data into a single variable. You can see an example of how to use datastore to do this i...

4 years ago | 0

Answered
Meshgrid lighning and how to use contour around the plot
You might find the settings in this example helpful. Not a perfect match, but here's what I came up with x=linspace(-2,2,1000);...

4 years ago | 1

| accepted

Answered
Trying to code from Polymath
I recommend going through MATLAB Onramp. It's free, and takes about 2 hours. That should give you the necessary skills to code t...

4 years ago | 0

Answered
how can I take mean of fourth dimension of daily data?
I see your times are recorded as decimal days: Times = 0 0.1250 0.2500 0.3750 0.5000 0.625...

4 years ago | 0

| accepted

Answered
Can someone help with error "index exceeds number of array elements"? I attached image as to what it needs to look like..
The error means you are indexing a variable using an index value that is greater than the number of elements in your variable. ...

4 years ago | 0

Answered
Is there any algorithm to find out how much time it took the signal to reach it's peak point. We can find it out manually, but is there any function or algorithm to calculate?
What comes to mind are the following: Find change points live task - add this task in a live script to interactively find abrup...

4 years ago | 0

| accepted

Answered
Changing content between 2 tab delimiters
I'd use readtable to load the data into MATLAB, and then make the changes to variable Q. See the Access Data in Tables doc page....

4 years ago | 1

| accepted

Answered
For every time stamp t do
Ch 12 of MATLAB Onramp introduces how to write if statements and for loops.

4 years ago | 0

Load more