Answered
Efficient identification of quoted substrings in a substring
Have you tried extractBetween?

5 years ago | 0

| accepted

Answered
Plotting curves over histogram: problem with legend
If exporting shows the data, yet viewing on your screen does not, I wonder if this is an issue with you graphics? The code itsel...

5 years ago | 0

| accepted

Answered
Interpolation between 2 data sets acquired at same grids
"when I try to interpolate to abtain the data points in between 2 different profiles at the same heights, it is not working" If...

5 years ago | 0

| accepted

Answered
Problem regarding my function
You have an indexing problem. You input to myfunc1 is used to index e. Your calculate it as fs*t + 1. The result is a 1x800001 v...

5 years ago | 0

Answered
How to parse through a text file then save to an array?
Based on what you've shared, I would probably look into fopen, fgetl, and strsplit or split maybe. The format is inconsistent,...

5 years ago | 0

Answered
Loading large .txt file
If your data is all of the same data type, try readmatrix. You can also explore additional options for loading text files, incl...

5 years ago | 0

| accepted

Answered
Density plot on geomap
If you want to use your value as the color, I recommend geoscatter. lon = (-170:10:170); lat = 50 * cosd(3*lon); C = rand(1,l...

5 years ago | 0

| accepted

Answered
Plotting timetable data in a barchart
You forgot to share your code, but it appears you are indexing your timetable incorrectly. See this page on how to access data i...

5 years ago | 0

| accepted

Answered
Datetime conversion from string with non-matching format does not yield an error
Unfortunately, 0021 is a valid date. Rather than rely on datetime to do this, you will likely need to create your own error mess...

5 years ago | 0

| accepted

Answered
Index in position 2 exceeds array bounds (must not exceed 2
The full error message is Index in position 2 exceeds array bounds (must not exceed 2). Error in untitled>bac...

5 years ago | 0

| accepted

Answered
Readtable for excel workbook file
https://www.mathworks.com/help/matlab/import_export/ways-to-import-spreadsheets.html Also look at the Name-Value pair arguments...

5 years ago | 0

Answered
How to save variables in a function to the workspace
Don't use globals. Return your variables through the function output. See the documentation. This example from that page shows h...

5 years ago | 1

| accepted

Answered
readtable command for csv file
Without seeing what lines 15473 looks like compared to, say, line 1, it's really hard to add to what the error message is alread...

5 years ago | 0

Answered
Clean up imported table
% Set up import options opts = detectImportOptions("DE_data_long.csv",'DecimalSeparator',","); opts = setvartype(opts,3:7,"dou...

5 years ago | 0

| accepted

Answered
generate a table of random number in specific range
I'd use randi with the following syntax X = randi(imax,n) k=3; X = randi(k,k)

5 years ago | 0

Answered
A numeric or double convertible argument is expected- How to plot from 'readtable'
See this page on how to access data in a table. Your syntax is returning a table. You need an array. Use curly braces t = C{:,...

5 years ago | 0

Answered
How to calculate hourly average value for measured Temperature, CO2, RH and Rid in 5 minutes interval
Use groupsummary. I suggest combining your dates and times into a single datetime varlable to make this easier. opts = detectIm...

5 years ago | 0

Answered
I want to know the value of x for each value of V
You are using x to calculate x. This is causing an error since x doesn't exist yet. What is the equation you are trying to impl...

5 years ago | 0

Answered
Activate/deactivate blocks of a GUI using radio button group
See this answer, that enables/disables components using a checkbox.

5 years ago | 0

| accepted

Answered
Import Data Tool Code
Is fileAbsolutePath the name of your text file? If so, try the following. uiimport('fileAbsolutePath.txt') If you want the Imp...

5 years ago | 0

| accepted

Answered
I can't uninstall and re-install for this problem: C:\\ProgramFiles\MATLAB\R2020a\help\matlab\helpsearch\segments_y (System cant't find certain files)
You will want to follow these instructions on uninstalling on Windows when the uninstaller fails and manually remove the directo...

5 years ago | 0

Answered
Need help creating a plot with x,y,z (2d plot with contour)
You have to do some interpolation to create a contour plot from your data. When plotting, you must have gridded data, meaning al...

5 years ago | 0

| accepted

Answered
How to write switch statement
Your syntax for the logical comparison is incorrect. You can't perform 2 comparisons on the same item. You must split this into ...

5 years ago | 0

| accepted

Answered
Split a column into two based on a delimiter
Your solution will not work if there are triple spaces. Also, your numbers get recorded as strings, which will make it hard to u...

5 years ago | 1

Answered
How to use "if statements" when "ismember" is based on multiple conditions?
Your syntax is not correct. Split your condition into 2 separate uses of ismember. Also, ismember returns a value for every elem...

5 years ago | 2

| accepted

Answered
How to sort a column of data based on another?
As shared in your original post tonight, look at sortrows.

5 years ago | 0

| accepted

Answered
Is there a way to turn scatter plots to data?
Just sort your data if that is what you want. Check out sortrows.

5 years ago | 0

| accepted

Answered
How to make a discrete colorbar with specified intervals?
Your colorbar is set by the resolution of your colormap. If you want a colobar with 16 colors, set a colormap that only has 16 d...

5 years ago | 2

Answered
How to retrieve optimal MinLeafSize after automatic hyperparameter optimization for Tree Ensemble (fitrensemble)?
I ran both a tree and ensemble models optimizing minLeafSize. For a decision tree, MinLeaf is a model parameter, but not for an ...

5 years ago | 0

| accepted

Answered
Where can I find the body block in Simulink? I downloaded all Simscape toolbox but still can not find it.
The instructions appear to be old. They give you the library path to where it would be. However, MathWorks deprecated the First ...

5 years ago | 0

| accepted

Load more