Answered
Unable to detect datetime or duration data using readtimetable with a seconds index
The issue appears to be that seconds get written in a format that MATLAB cannot read back in. The only supported input formats f...

5 years ago | 0

| accepted

Answered
Setting default XLimitMethod not working
That would explain it. This appears to be a new property that was added in R2021a. https://www.mathworks.com/help/matlab/ref/ma...

5 years ago | 0

| accepted

Answered
2D line graph plotting from calculations
Right now, each loop replaces the previous variable values with the new values. Insteach, you need to capture the result of each...

5 years ago | 0

Answered
Return field in struct whose field name contains a string
One way is to use the functions fieldnames and contains. Struct.Data.FieldOne =1;%1000x2 double Struct.Data.FieldTwo =2;%1000x...

5 years ago | 1

Answered
graphing x as a function of y, y as a function of x in one plot
You would benefit by going through MATLAB Onramp. Ch 3 covers creating vectors and matrices Ch 6 covers array calculations (el...

5 years ago | 0

Answered
How to retrievre the code that generates a figure?
Unfortunately, no, information on which file was used to create a figure is not captured. Perhaps you could use Date Created and...

5 years ago | 0

| accepted

Answered
Error using string concatenation as input to ordinal( ) function
There is a warning at the top of the documentation page for ordinal The nominal and ordinal array data types are not recommende...

5 years ago | 0

| accepted

Answered
Vectors not the same length
If there are less items in Speed then Time, then your if statement should use length(Speed) instead. However, that may not alway...

5 years ago | 0

| accepted

Answered
Name timetable values based on datetimes defining time range
You may find the page Access Data in a Table helpful.

5 years ago | 0

| accepted

Answered
Heatmap from Array For data set
If you want to keep everything as vectors, you will need to turn your array into a table with at least 3 variables. Then create ...

5 years ago | 0

Answered
How to show multiple lines in the legend?
You are replacing the legend each time. Use the loop to build up your labels, but don't atually create the legend until you exit...

5 years ago | 0

Answered
Why I have this error: "Error using ==> minus Matrix dimensions must agree."
You haven't given us all your inputs, so we can only guess. It does appear your inputs to ex3_d_f are not in the correct order....

5 years ago | 0

Answered
Problems with printing superscripts in a textbox in a graph
Remove the backslash in your exponent. c3.a0 = 0.925; c3.a1 = 2.82e-7; c3.c = 2.15; r2.adjrsquare = -0.11; paramstxt = ce...

5 years ago | 0

| accepted

Answered
Turning for loops into functions
If you are using a live script, you could try refactoring your code. See https://www.mathworks.com/help/matlab/matlab_prog/im...

5 years ago | 0

| accepted

Answered
Create a specific legend in Matlab
I don't follow your description completely. What should the actual legend be? Should there be 6 items in your legend? Three usin...

5 years ago | 1

Answered
How to define nested function?
I get other errors when I try to implement your function. Perhaps you could share the code you ran that created this error? The...

5 years ago | 0

Answered
Find baseline and sudden signal changes (as well as duration until return to baseline) for noisy data
You may find the Signal Processing Onramp very helpful. Chs 3 and 6 look directly applicable here, but perhaps some of the other...

5 years ago | 0

Answered
count occurences and create a table
You have to assign array2table to something if you want to capture it. You have to use indexing to capture the result from each...

5 years ago | 0

Answered
Plotting of time series from data
Ch 9 of MATLAB Onramp covers plotting. To make this a time series, you will need some time data that corresponds with your data...

5 years ago | 0

| accepted

Answered
How to open .mdl in 2020b
Model names must start with a letter and can contain letters, numbers, and underscores. Try removing the " (1)" and see if that ...

5 years ago | 1

| accepted

Answered
App designer - deleting an unnamed plot
If you capture the chart line object for each plot, you could use that with the delete function to remove just that line from th...

5 years ago | 1

| accepted

Answered
Conversion of ECG signal to image in matlab
Plot it and save the figure as an image. https://www.mathworks.com/help/matlab/creating_plots/saving-your-work.html

5 years ago | 1

Answered
scatter3, stop the color changing after a second scatter3 command
This might be a bit tricky to explain what is happening. By specifying C as a vector, the following method is used to determine ...

5 years ago | 1

Answered
From file.txt to plot
Ch 11 of MATLAB Onramp covers importing data, and Ch 9 covers plotting.

5 years ago | 0

Answered
MATLAB, macOS Catalina 10.15 Java error with accessibility keyboard enabled: Please Fix
For anyone needing accessiblity, perhaps the response in this post will be helpful.

5 years ago | 0

Answered
How to group by 2 variables, with unique colors for one and unique shapes for the other
There are a couple competing issues. First, all points in a series will have the same color and marker by default. Rather than f...

5 years ago | 0

| accepted

Answered
A column vector with words
All values in your variable must be of the same datatype. By creating your variable with the zeros function, you define A as bei...

5 years ago | 0

Answered
MATLAB Release that fits to correct Version of Data Acquisition Toolbox™ Support Package for National Instruments® NI-DAQmx Devices
I found some links that may be helpful. I do want to caution that my response should not be considered an official response from...

5 years ago | 0

| accepted

Answered
How do I plot 2 surf plots in different figures
The code you have shared appears to work fine. You do have an extra figure; command that you don't need (after the second surf c...

5 years ago | 1

| accepted

Answered
Legend on graph not displaying correct labels
It might be worth trying to specify a target for your legend commands using the syntax legend(target,___) So for example, le...

5 years ago | 0

Load more