Answered
Second plot overwrites first plot in function script
I think this has to do with how live scripts handle figures. The fix is to remove the (1) and (2) after the figure commands in y...

1 month ago | 1

| accepted

Answered
Not Enough input argument for image
I could be more certain if you shared the data you used to call your function, but here is the example I tested. f = imread('pe...

1 month ago | 0

Answered
Can you help me download some matlab toolboxes?
Use the Add-Ons explorer in MATLAB to get and manage toolboxes included on your license.

1 month ago | 0

Answered
Lamps in Matlab App Desinger
Your code looks fine to me. A simple test app also works for me. Note that you want your lamp to turn green when it is turned on...

1 month ago | 0

Answered
Error "Index in position 2 is invalid."
The error is because your second index, the column index for gmat, which is gdata(2,i), is 0. That is not a valid index. Indices...

1 month ago | 0

Answered
Access ui edit field values and sharing them in different functions
I would suggest developing your app in app designer. Once there, see this page on how to share data within your app. https://ww...

1 month ago | 0

Answered
How to analyse hundreads of excel files (milliseconds data) with Matlab with timeseries?
I would use a filedatastore to load all the data into a single variable (doesn't matter if they are csv or xlsx). You can see an...

1 month ago | 1

| accepted

Answered
finding a value from a point in a table
So you want to use your own indexing scheme to extract data from your array. It's possible, but is going to be a bit convoluted....

2 months ago | 1

| accepted

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...

2 months 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...

2 months 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, ...

2 months 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)...

2 months 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...

2 months 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,...

2 months ago | 0

| accepted

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

2 months 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);

2 months 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...

2 months 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...

2 months 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...

2 months 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...

2 months ago | 1

| accepted

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

2 months 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...

2 months 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...

2 months 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...

2 months 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...

2 months 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

2 months 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...

2 months 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...

2 months 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 ...

2 months 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...

2 months ago | 0

| accepted

Load more