Answered

Datetime to string format issue

Don't use datestr. As its documentation page states, it is not recommended. Use string or char instead. dt = datetime('now'); ...

Datetime to string format issue

Don't use datestr. As its documentation page states, it is not recommended. Use string or char instead. dt = datetime('now'); ...

11 days ago | 0

| accepted

Answered

How to manually move (smoothly) a set of evenly spaced xlines

With your clarifying picture there may be another possibility. You could just put the xline objects in their required position a...

How to manually move (smoothly) a set of evenly spaced xlines

With your clarifying picture there may be another possibility. You could just put the xline objects in their required position a...

11 days ago | 1

Answered

How to manually move (smoothly) a set of evenly spaced xlines

While you can't create a vector of xline objects in one call in release R2020a, you can store those handles in an array. axis([...

How to manually move (smoothly) a set of evenly spaced xlines

While you can't create a vector of xline objects in one call in release R2020a, you can store those handles in an array. axis([...

11 days ago | 1

| accepted

Answered

operator > is not supported for operands type of cell

None of the relational operators are defined for cell arrays. A cell array can contain basically any type of data you can create...

operator > is not supported for operands type of cell

None of the relational operators are defined for cell arrays. A cell array can contain basically any type of data you can create...

11 days ago | 2

| accepted

Answered

Suggest an Alternate for Nonzero (nnz) built-in function

You can keep track of the next row to be filled. When you add data to a row, increment that tracking variable. x = zeros(6, 3);...

Suggest an Alternate for Nonzero (nnz) built-in function

You can keep track of the next row to be filled. When you add data to a row, increment that tracking variable. x = zeros(6, 3);...

12 days ago | 0

Answered

Error using vertcat Dimensions of arrays being concatenated are not consistent.

What is the full and exact text of the warning and/or error messages you receive? Please show us all the text displayed in orang...

Error using vertcat Dimensions of arrays being concatenated are not consistent.

What is the full and exact text of the warning and/or error messages you receive? Please show us all the text displayed in orang...

12 days ago | 0

Answered

Making class accessible without having its .m file in current folder

In order to create or work with an instance of the class, it must be accessible to MATLAB. This means it must be in the "current...

Making class accessible without having its .m file in current folder

In order to create or work with an instance of the class, it must be accessible to MATLAB. This means it must be in the "current...

12 days ago | 0

| accepted

Answered

MY MATLAB KEEPS ON CRASHING ON MY MAC. ITS THE 2022b

If by "crash" you mean MATLAB shows a stack trace and/or immediately disappears, please send the crash log file to MathWorks Tec...

MY MATLAB KEEPS ON CRASHING ON MY MAC. ITS THE 2022b

If by "crash" you mean MATLAB shows a stack trace and/or immediately disappears, please send the crash log file to MathWorks Tec...

13 days ago | 0

| accepted

Answered

How can i download this model example from mathworks?

Have you installed the Support Package using the instructions on this documentation page? When I did I was able to open that exa...

How can i download this model example from mathworks?

Have you installed the Support Package using the instructions on this documentation page? When I did I was able to open that exa...

13 days ago | 0

| accepted

Answered

Does the base Matlab have something similar to Java's command 'setDefaultCloseOperation'?

If you want to detect if a handle is a valid Handle Graphics object, use ishghandle. f = figure; f2 = figure; x = 42; close(...

Does the base Matlab have something similar to Java's command 'setDefaultCloseOperation'?

If you want to detect if a handle is a valid Handle Graphics object, use ishghandle. f = figure; f2 = figure; x = 42; close(...

13 days ago | 0

Answered

Can you help me write a rubik algorithm using Fridrich method?

Cleve Moler has written about the Rubik's Cube on a number of occasions in his blog. See a list of search results for Rubik. If...

Can you help me write a rubik algorithm using Fridrich method?

Cleve Moler has written about the Rubik's Cube on a number of occasions in his blog. See a list of search results for Rubik. If...

13 days ago | 0

Answered

The plot of cosine is not shown

What multiples of pi are you taking the cosine of? t = -2:0.01:2; A = 2*100*t; What's the largest difference in absolute valu...

The plot of cosine is not shown

What multiples of pi are you taking the cosine of? t = -2:0.01:2; A = 2*100*t; What's the largest difference in absolute valu...

13 days ago | 0

Answered

Matrix index is out of range for deletion.

What happens if you try to delete the 11th element of a vector with 10 elements? try x = 1:10; x(11) = []; catch ME ...

Matrix index is out of range for deletion.

What happens if you try to delete the 11th element of a vector with 10 elements? try x = 1:10; x(11) = []; catch ME ...

13 days ago | 0

| accepted

Answered

Singular value decomposition method for solving least squares problems

In this case does not represent summation. One of the ways in which the singular value decomposition is represented is: "Spe...

Singular value decomposition method for solving least squares problems

In this case does not represent summation. One of the ways in which the singular value decomposition is represented is: "Spe...

13 days ago | 1

Answered

Why does histogram gives issues? I rephrased my question

x = rand(1, 1e5)*1e-5; ax = axes; Specify bins edges with logarithmic spacing. h = histogram(ax, x, 10.^(-10:-5)); Set the X...

Why does histogram gives issues? I rephrased my question

x = rand(1, 1e5)*1e-5; ax = axes; Specify bins edges with logarithmic spacing. h = histogram(ax, x, 10.^(-10:-5)); Set the X...

14 days ago | 0

Answered

Getting different values when indexing with islocalmax and find

The islocalmax function is not the correct function to use here. Note that in the code below that there are some rows of ind tha...

Getting different values when indexing with islocalmax and find

The islocalmax function is not the correct function to use here. Note that in the code below that there are some rows of ind tha...

14 days ago | 0

Answered

How to merge very close bins in histogram/hiscounts

Once you've binned your data once, use whatever mechanism you want to determine which bin edges separate bins you want to merge....

How to merge very close bins in histogram/hiscounts

Once you've binned your data once, use whatever mechanism you want to determine which bin edges separate bins you want to merge....

14 days ago | 0

Answered

Integers in Arrays Give Strange Result

For concatenation see this documentation page. If you concatenate one or more integer arrays with one or more double arrays, the...

Integers in Arrays Give Strange Result

For concatenation see this documentation page. If you concatenate one or more integer arrays with one or more double arrays, the...

15 days ago | 0

| accepted

Answered

what is inline(vectorize function), also why to use fliplr for this?

Do not use inline. Its use has been discouraged for probably around 15 years now. To convert a piece of text data to something ...

what is inline(vectorize function), also why to use fliplr for this?

Do not use inline. Its use has been discouraged for probably around 15 years now. To convert a piece of text data to something ...

15 days ago | 1

Answered

Table column of strings to a matrix.

A=["[0 0 0 0 0 0 0 0]";"[0 0 0 0 0 0 0 0]";"[0 0 0 0 0 0 0 0]";"[1 1 1 1 1 1 1 1]"] A2 = erase(A, ["[", "]"]) double(split(A2,...

Table column of strings to a matrix.

A=["[0 0 0 0 0 0 0 0]";"[0 0 0 0 0 0 0 0]";"[0 0 0 0 0 0 0 0]";"[1 1 1 1 1 1 1 1]"] A2 = erase(A, ["[", "]"]) double(split(A2,...

15 days ago | 2

Answered

How can I get all properties of some object of UIAXES app designer

If I have a book sitting on a table and I touch the cover of the book, have I touched the table? No. So things that are concerne...

How can I get all properties of some object of UIAXES app designer

If I have a book sitting on a table and I touch the cover of the book, have I touched the table? No. So things that are concerne...

16 days ago | 0

Answered

Custom exponential fit doesn't seem to work

Consider specifying the Normalize name-value pair argument in your fit call to normalize the X data. In my example below I'll us...

Custom exponential fit doesn't seem to work

Consider specifying the Normalize name-value pair argument in your fit call to normalize the X data. In my example below I'll us...

16 days ago | 0

Answered

apparently the command rmoutliers does not do the job correctly

Rather than going directly to rmoutliers I recommend using isoutlier to detect the outliers then process the resulting logical a...

apparently the command rmoutliers does not do the job correctly

Rather than going directly to rmoutliers I recommend using isoutlier to detect the outliers then process the resulting logical a...

16 days ago | 0

| accepted

Answered

Failed to "dot indexing" the data from uitable

The Data property of a uitable can contain different types of data, as stated on this documentation page. If you had stored a ta...

Failed to "dot indexing" the data from uitable

The Data property of a uitable can contain different types of data, as stated on this documentation page. If you had stored a ta...

20 days ago | 1

| accepted

Answered

How to modify the built-in 'fetch' function so that it can select columns flexibly?

s = {'Larry', 'Curly', 'and Moe'} s2 = strjoin(s, ', ')

How to modify the built-in 'fetch' function so that it can select columns flexibly?

s = {'Larry', 'Curly', 'and Moe'} s2 = strjoin(s, ', ')

20 days ago | 0

| accepted

Answered

griddedInterpolant bug with Matlab Coder in R2022b

The first error you received is not a bug. The fact that griddedInterpolant requires that the sample points be vectors rather th...

griddedInterpolant bug with Matlab Coder in R2022b

The first error you received is not a bug. The fact that griddedInterpolant requires that the sample points be vectors rather th...

20 days ago | 0

Answered

I want to count (tally) the number of occurrences of any generated integer over a 156 for-loop.

Are all these values integer values? If so consider using histcounts with the 'integers' BinMethod. values = randi(100, [200, 5...

I want to count (tally) the number of occurrences of any generated integer over a 156 for-loop.

Are all these values integer values? If so consider using histcounts with the 'integers' BinMethod. values = randi(100, [200, 5...

20 days ago | 0

Answered

Incorrect Inputformat for datetime function

If I look at the documentation for the Format property on the datetime documentation page, two of the "Examples of Common Format...

Incorrect Inputformat for datetime function

If I look at the documentation for the Format property on the datetime documentation page, two of the "Examples of Common Format...

20 days ago | 1

Answered

Finding the mean value of a set.

Original data: x= [1 2 4 6 2 7 8 4 5 7 8 9] Reshape it into a 3-by-whatever matrix. I'll let MATLAB figure out what "whatever"...

Finding the mean value of a set.

Original data: x= [1 2 4 6 2 7 8 4 5 7 8 9] Reshape it into a 3-by-whatever matrix. I'll let MATLAB figure out what "whatever"...

20 days ago | 0

Answered

How do I replace -1.0000e+30 with NaN?

Since I'm guessing -1e30 is an outlier in your data you could use filloutliers. I'll use a slightly smaller outlier value for th...

How do I replace -1.0000e+30 with NaN?

Since I'm guessing -1e30 is an outlier in your data you could use filloutliers. I'll use a slightly smaller outlier value for th...

21 days ago | 0