Answered

Setting a plot's x-axis by units and not finer data points?

When you call plot with one data input, the indices of the elements in the vector are used as the X coordinates. plot((1:10).^2...

Setting a plot's x-axis by units and not finer data points?

When you call plot with one data input, the indices of the elements in the vector are used as the X coordinates. plot((1:10).^2...

14 Tage ago | 0

Answered

Use of geoglobe in MATLAB R2017a

As stated on the documentation page for the geoglobe function, it was introduced in release R2020a. It did not exist in release ...

Use of geoglobe in MATLAB R2017a

As stated on the documentation page for the geoglobe function, it was introduced in release R2020a. It did not exist in release ...

14 Tage ago | 0

Answered

I am trying to solve 3 simultaneous ODE's. Which method to use?

This documentation page includes two examples, the second of which you can use as a model for your code to solve a system of dif...

I am trying to solve 3 simultaneous ODE's. Which method to use?

This documentation page includes two examples, the second of which you can use as a model for your code to solve a system of dif...

14 Tage ago | 1

Answered

creating variables with a for loop

Can you define variables with numbered names like X1, X2, X3, ... or whose names are given by a list of strings? Yes. Should y...

creating variables with a for loop

Can you define variables with numbered names like X1, X2, X3, ... or whose names are given by a list of strings? Yes. Should y...

17 Tage ago | 0

Answered

Which toolboxes are recommended for civil engineering?

This question is really quite general and so it's difficult to give a definitive answer. If you open the Solutions page linked a...

Which toolboxes are recommended for civil engineering?

This question is really quite general and so it's difficult to give a definitive answer. If you open the Solutions page linked a...

18 Tage ago | 0

Answered

Efficient ODE with function handles

Does f_function expect to be called with two input arguments or three? x = [1; 2; 3]; y = [4; 5; 6]; value1 = min([x, y], 4) ...

Efficient ODE with function handles

Does f_function expect to be called with two input arguments or three? x = [1; 2; 3]; y = [4; 5; 6]; value1 = min([x, y], 4) ...

18 Tage ago | 0

Answered

Converting hh:mm:ss into seconds

t='14:35:59.812'; F = 'hh:mm:ss.SSS'; du = duration(t, 'InputFormat', F, 'Format', F) format longg % To make s look nicer s ...

Converting hh:mm:ss into seconds

t='14:35:59.812'; F = 'hh:mm:ss.SSS'; du = duration(t, 'InputFormat', F, 'Format', F) format longg % To make s look nicer s ...

20 Tage ago | 0

Answered

How to average first two dimension of 3D array/matrix?

The ability to specify a vector of dimensions over which to sum an array was introduced in release R2018b as stated in the Relea...

How to average first two dimension of 3D array/matrix?

The ability to specify a vector of dimensions over which to sum an array was introduced in release R2018b as stated in the Relea...

20 Tage ago | 1

Answered

function whose arguments contains a function with possibly a variable number of outputs

See this documentation page, specifically the section on How to Use Comma-Separated Lists.

function whose arguments contains a function with possibly a variable number of outputs

See this documentation page, specifically the section on How to Use Comma-Separated Lists.

20 Tage ago | 0

| accepted

Answered

For inbuilt solvers ODE23/DDE23, how to keep saving/output all solution values intermediately (eg: every 1 hour, save/output the solution instead of only after reaching tf)

Specify an OutputFcn in your dde23 function. Have that OutputFcn log the data to a file.

For inbuilt solvers ODE23/DDE23, how to keep saving/output all solution values intermediately (eg: every 1 hour, save/output the solution instead of only after reaching tf)

Specify an OutputFcn in your dde23 function. Have that OutputFcn log the data to a file.

21 Tage ago | 0

Answered

How can I convert a time vector of HH:SS to a decimal?

If you have them stored as a duration array just use the hours function. du = duration({'03:30', '04:45'}, 'InputFormat', 'hh:m...

How can I convert a time vector of HH:SS to a decimal?

If you have them stored as a duration array just use the hours function. du = duration({'03:30', '04:45'}, 'InputFormat', 'hh:m...

22 Tage ago | 1

| accepted

Answered

Loading mat files does not support enumerations with function handles?

The question of whether two function handles are the same is a bit complicated.

Loading mat files does not support enumerations with function handles?

The question of whether two function handles are the same is a bit complicated.

23 Tage ago | 1

Answered

How to compute the standard deviation of each column in a matrix?

To be certain that you're taking the std over each column, specify the dim input argument as described on the documentation page...

How to compute the standard deviation of each column in a matrix?

To be certain that you're taking the std over each column, specify the dim input argument as described on the documentation page...

23 Tage ago | 0

Answered

All -9999 in a table to NaN

Use standardizeMissing. dblVar = [NaN;3;Inf;7;9]; cellstrVar = {'one';'three';'';'N/A';'nine'}; charVar = ['A';'C';'E';' ';'I...

All -9999 in a table to NaN

Use standardizeMissing. dblVar = [NaN;3;Inf;7;9]; cellstrVar = {'one';'three';'';'N/A';'nine'}; charVar = ['A';'C';'E';' ';'I...

25 Tage ago | 0

| accepted

Answered

How do I get over a MATLAB addiction?

Sometimes such an "obsession" or "addiction" can lead to a 20 year and counting career, so it's not always so bad. :)

How do I get over a MATLAB addiction?

Sometimes such an "obsession" or "addiction" can lead to a 20 year and counting career, so it's not always so bad. :)

25 Tage ago | 0

| accepted

Answered

Variables as arguments in 'listed' function inputs

What you've written is the command syntax. You want to use the function syntax instead. See this documentation page for more inf...

Variables as arguments in 'listed' function inputs

What you've written is the command syntax. You want to use the function syntax instead. See this documentation page for more inf...

26 Tage ago | 1

| accepted

Answered

draw histogramm of X(i)

Instead of calling hist (whose use is discouraged) use histogram. And I second the cyclist's question for more information abou...

draw histogramm of X(i)

Instead of calling hist (whose use is discouraged) use histogram. And I second the cyclist's question for more information abou...

26 Tage ago | 0

Answered

For loop stops after one step

What makes you believe the loop stops after one step? Were you expecting PhilW to contain the sum of X, Y, and Z for each elemen...

For loop stops after one step

What makes you believe the loop stops after one step? Were you expecting PhilW to contain the sum of X, Y, and Z for each elemen...

27 Tage ago | 0

| accepted

Answered

how to evaluate integral for given input function ?

You don't have a function, you have a vector of data. Unless you know the form of the function x(u) from the theory underlying y...

how to evaluate integral for given input function ?

You don't have a function, you have a vector of data. Unless you know the form of the function x(u) from the theory underlying y...

27 Tage ago | 0

Answered

solve(eqn,x) giving wrong answer

You can check the answer. sympref('FloatingPointOutput',true) syms x y eqn = -1.5960e-06*x^2 + 0.0367*x - 2.0468 == y solx =...

solve(eqn,x) giving wrong answer

You can check the answer. sympref('FloatingPointOutput',true) syms x y eqn = -1.5960e-06*x^2 + 0.0367*x - 2.0468 == y solx =...

28 Tage ago | 0

Answered

matlab standalone desktop app stuck in syms command

Creation of symbolic expressions using sym or syms is not supported in MATLAB Compiler as stated on this documentation page. Per...

matlab standalone desktop app stuck in syms command

Creation of symbolic expressions using sym or syms is not supported in MATLAB Compiler as stated on this documentation page. Per...

28 Tage ago | 0

| accepted

Answered

How to zero mean a 3-D array

A = randi(10, [3 3 4]) B = normalize(A, 3, 'center') % "Center data to have mean 0" check = mean(B, 3) % Should all be close t...

How to zero mean a 3-D array

A = randi(10, [3 3 4]) B = normalize(A, 3, 'center') % "Center data to have mean 0" check = mean(B, 3) % Should all be close t...

28 Tage ago | 0

Answered

Peculiar behavior in compiled standalone

Is the function in the standalone application that throws an error operating on one or more of the input arguments with which th...

Peculiar behavior in compiled standalone

Is the function in the standalone application that throws an error operating on one or more of the input arguments with which th...

28 Tage ago | 0

Answered

Split matrix in 15 submatrices

Don't try to make variables with numbers in the name like A1, A2, ... A15. Use mat2cell instead.

Split matrix in 15 submatrices

Don't try to make variables with numbers in the name like A1, A2, ... A15. Use mat2cell instead.

29 Tage ago | 0

| accepted

Answered

How to "dbup" to ORIGINAL error after try/catch and rethrow?

Set a breakpoint inside the catch section of the try / catch block. If you only want to enter debug mode when certain errors are...

How to "dbup" to ORIGINAL error after try/catch and rethrow?

Set a breakpoint inside the catch section of the try / catch block. If you only want to enter debug mode when certain errors are...

29 Tage ago | 0

Answered

How to get only real output from (-3)^(1/3)

You can use the nthroot function. y = nthroot(-3, 3)

How to get only real output from (-3)^(1/3)

You can use the nthroot function. y = nthroot(-3, 3)

30 Tage ago | 2

Answered

How does reshape function work? and also how to use sum(A,dim) in the code?

For reshape, conceptually you can think of it as taking a long string of elements: x = 1:16; and putting them into the element...

How does reshape function work? and also how to use sum(A,dim) in the code?

For reshape, conceptually you can think of it as taking a long string of elements: x = 1:16; and putting them into the element...

30 Tage ago | 1

Answered

All my commands end up in workspace

Your last three lines create variables that shadow the title, xlabel, and ylabel functions rather than calling those funcions. I...

All my commands end up in workspace

Your last three lines create variables that shadow the title, xlabel, and ylabel functions rather than calling those funcions. I...

etwa ein Monat ago | 0

| accepted

Answered

Operands to the logical and (&&) and or (||) operators must be convertible to logical scalar values. What is my mistake ?

Use discretize. % If sales are in the range [0, 500000) the bonus rate is 0 % If sales are in the range [500000, 1000000) the ...

Operands to the logical and (&&) and or (||) operators must be convertible to logical scalar values. What is my mistake ?

Use discretize. % If sales are in the range [0, 500000) the bonus rate is 0 % If sales are in the range [500000, 1000000) the ...

etwa ein Monat ago | 0