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

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

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

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

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

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

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

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

12 dagar 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,...

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

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

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

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

16 dagar 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, ', ')

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

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

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

17 dagar 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"...

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

17 dagar ago | 0

Answered

Query regarding update to MATLAB R2022b.

That is correct. Generally there are enough significant changes between releases that some sort of "incremental update" like you...

Query regarding update to MATLAB R2022b.

That is correct. Generally there are enough significant changes between releases that some sort of "incremental update" like you...

17 dagar ago | 0

| accepted

Answered

Variables from diagram do not exist after run

The histogram handle h and its properties are tied to the existence of the histogram object in the figure window. If that histog...

Variables from diagram do not exist after run

The histogram handle h and its properties are tied to the existence of the histogram object in the figure window. If that histog...

17 dagar ago | 0

Answered

is it possible to make this code shorter?

One function that will be of use to you is cumsum. This will let you avoid variables with numbered names like r1, r2, r3, etc. I...

is it possible to make this code shorter?

One function that will be of use to you is cumsum. This will let you avoid variables with numbered names like r1, r2, r3, etc. I...

17 dagar ago | 0

Answered

Sim() error in MATLAB app designer

y=sim('app.var',p); %estimted This tries to call a version of the sim function that accepts a char vector as the first input...

Sim() error in MATLAB app designer

y=sim('app.var',p); %estimted This tries to call a version of the sim function that accepts a char vector as the first input...

18 dagar ago | 0

Answered

Working around Global Variables and Pointers

Since each Particle and each Room represent a unique physical object they should probably be handle classes with handle semantic...

Working around Global Variables and Pointers

Since each Particle and each Room represent a unique physical object they should probably be handle classes with handle semantic...

18 dagar ago | 0

| accepted

Answered

Test of whether matrix is Symmetric Positive Definite is giving wrong result when matrix is not symmetric

From the chol documentation page: "If A is nonsymmetric , then chol treats the matrix as symmetric and uses only the diagonal an...

Test of whether matrix is Symmetric Positive Definite is giving wrong result when matrix is not symmetric

From the chol documentation page: "If A is nonsymmetric , then chol treats the matrix as symmetric and uses only the diagonal an...

18 dagar ago | 1

| accepted

Answered

Error using * Inner matrix dimensions must agree.

F = 13; T = 0.1; n = (0:T:1); xn = cos(2*pi*F*n); t = linspace(-0.5, 1.5, 500); Now let's look at the terms you're multiply...

Error using * Inner matrix dimensions must agree.

F = 13; T = 0.1; n = (0:T:1); xn = cos(2*pi*F*n); t = linspace(-0.5, 1.5, 500); Now let's look at the terms you're multiply...

18 dagar ago | 0

Answered

Want to purchase the license for System composer

If you have general sales questions or would like a quote for this product please contact the Sales department using the Contact...

Want to purchase the license for System composer

If you have general sales questions or would like a quote for this product please contact the Sales department using the Contact...

18 dagar ago | 0

Answered

solve a linear system of equations with several unknown parameters

syms f11 f12 f21 f22 g1 g2 V=[2 1 1; 4 1 1; 4 2 1; 2 2 1] ; F=[f11 f21;f12 f22;g1 g2]; U=[1...

solve a linear system of equations with several unknown parameters

syms f11 f12 f21 f22 g1 g2 V=[2 1 1; 4 1 1; 4 2 1; 2 2 1] ; F=[f11 f21;f12 f22;g1 g2]; U=[1...

18 dagar ago | 0

| accepted

Answered

how to interpolate outside the domain of x?

From Mark Twain's "Life on the Mississippi", a quote on the potential danger of extrapolation. "In the space of one hundred and...

how to interpolate outside the domain of x?

From Mark Twain's "Life on the Mississippi", a quote on the potential danger of extrapolation. "In the space of one hundred and...

18 dagar ago | 1

Answered

Index exceeds the number of array elements. Index must not exceed 620757.

What is element number 11 of the following vector? x = 1:10 The answer to the question is "it doesn't exist." In situations wh...

Index exceeds the number of array elements. Index must not exceed 620757.

What is element number 11 of the following vector? x = 1:10 The answer to the question is "it doesn't exist." In situations wh...

18 dagar ago | 0