Answered

error when I try to open a file to edit

Do you have a function you've created named settings.m? Does the command below show just one item (in a subdirectory under toolb...

error when I try to open a file to edit

Do you have a function you've created named settings.m? Does the command below show just one item (in a subdirectory under toolb...

19 días ago | 0

Answered

how can i change the value of a variable with a slider in matlab designer?

Rather than changing the value of a fixed variable I would likely retrieve the Value property of the slider object whenever I ne...

how can i change the value of a variable with a slider in matlab designer?

Rather than changing the value of a fixed variable I would likely retrieve the Value property of the slider object whenever I ne...

19 días ago | 0

Answered

MPC toolbox computation time

If you're trying to analyze the performance of your Simulink model (to identify bottlenecks?) consider using Simulink Profiler.

MPC toolbox computation time

If you're trying to analyze the performance of your Simulink model (to identify bottlenecks?) consider using Simulink Profiler.

19 días ago | 0

Answered

I wan to display an image of size 512x512x150 using matlab.

Take a look at the tools listed in the Volume Visualization section of the documentation.

I wan to display an image of size 512x512x150 using matlab.

Take a look at the tools listed in the Volume Visualization section of the documentation.

19 días ago | 0

Answered

why my conditional function is not what I expected?

if X>=0 & X^2+Y^2<4 From the documentation for the if keyword: "if expression, statements, end evaluates an expression, and exe...

why my conditional function is not what I expected?

if X>=0 & X^2+Y^2<4 From the documentation for the if keyword: "if expression, statements, end evaluates an expression, and exe...

20 días ago | 1

Answered

Why isn't my figure consistent? It keeps changing every time

Here's one line of your code. I've put it in block comments so MATLAB Answers won't try to execute it, since I have other code l...

Why isn't my figure consistent? It keeps changing every time

Here's one line of your code. I've put it in block comments so MATLAB Answers won't try to execute it, since I have other code l...

20 días ago | 0

Answered

Matlab coder support for fitdist

In general we don't comment on future plans. I recommend that you submit this as an enhancement request to Technical Support. If...

Matlab coder support for fitdist

In general we don't comment on future plans. I recommend that you submit this as an enhancement request to Technical Support. If...

20 días ago | 0

| accepted

Answered

imhist and histogram giving different results

I suspect that imhist and histogram are just using different algorithms to select the bin edges in the case where you only speci...

imhist and histogram giving different results

I suspect that imhist and histogram are just using different algorithms to select the bin edges in the case where you only speci...

20 días ago | 0

Answered

How to change folders in MATLAB App Designer ?

I would advise you to use fullfile to assemble your file paths rather than concatenation. I'd also be wary about assuming that p...

How to change folders in MATLAB App Designer ?

I would advise you to use fullfile to assemble your file paths rather than concatenation. I'd also be wary about assuming that p...

21 días ago | 1

Answered

Issue with N body problem using ode45

Are you certain on those satellite masses? Looking at Wikipedia the mass of the Great Pyramid of Giza is 6e9 kg. Are these satel...

Issue with N body problem using ode45

Are you certain on those satellite masses? Looking at Wikipedia the mass of the Great Pyramid of Giza is 6e9 kg. Are these satel...

21 días ago | 0

Answered

How to convert column datetime (yyyy-mm-dd HH:MM:DD.000) into MJD and decyear?

According to Wikipedia the modified Julian date is the number of days since November 17, 1858. It is also the Julian date minus ...

How to convert column datetime (yyyy-mm-dd HH:MM:DD.000) into MJD and decyear?

According to Wikipedia the modified Julian date is the number of days since November 17, 1858. It is also the Julian date minus ...

21 días ago | 0

Answered

Error using the 'square' interpolation method in interp1 function

I don't believe there was ever a 'square' interpolation method in interp1. But the input argument checking in much older version...

Error using the 'square' interpolation method in interp1 function

I don't believe there was ever a 'square' interpolation method in interp1. But the input argument checking in much older version...

21 días ago | 2

Answered

What is the legal status of code examples on mathworks.com?

Please contact Customer Service for an official answer to legal questions about MathWorks examples.

What is the legal status of code examples on mathworks.com?

Please contact Customer Service for an official answer to legal questions about MathWorks examples.

22 días ago | 1

| accepted

Answered

how to display newline

If you're using release R2016b or later you can use the newline function, perhaps in conjunction with a string array. s = "appl...

how to display newline

If you're using release R2016b or later you can use the newline function, perhaps in conjunction with a string array. s = "appl...

22 días ago | 0

Answered

I cannot use "binornd" or "random" function

Both binornd and random are functions in Statistics and Machine Learning Toolbox. Do you have this toolbox installed and license...

I cannot use "binornd" or "random" function

Both binornd and random are functions in Statistics and Machine Learning Toolbox. Do you have this toolbox installed and license...

23 días ago | 0

| accepted

Answered

Issue with finding the indices of the minimum element in a 3-Dimensional Array

Use the 'all' dimension argument and the 'linear' index argument to obtain the linear index of the maximum of the array consider...

Issue with finding the indices of the minimum element in a 3-Dimensional Array

Use the 'all' dimension argument and the 'linear' index argument to obtain the linear index of the maximum of the array consider...

25 días ago | 1

Answered

I don't understand the behavior of discretize

The calculated edges make no sense, and the output is clearly bins of non-uniform width. No, in that example the bins are unifo...

I don't understand the behavior of discretize

The calculated edges make no sense, and the output is clearly bins of non-uniform width. No, in that example the bins are unifo...

27 días ago | 0

Answered

function in a script file

You cannot define a function inside an if statement. You can define a function in a script or function file outside of the if s...

function in a script file

You cannot define a function inside an if statement. You can define a function in a script or function file outside of the if s...

27 días ago | 0

Answered

Where is plotSlice?

How are you calling plotSlice? According to the documentation page plotSlice requires its input to be a "Linear regression model...

Where is plotSlice?

How are you calling plotSlice? According to the documentation page plotSlice requires its input to be a "Linear regression model...

27 días ago | 0

| accepted

Answered

How to write an quadratic.m function

I assume you've saved this in a file named QuadraticEquation.m. If so you just need to rename the file to quadratic.m and ideall...

How to write an quadratic.m function

I assume you've saved this in a file named QuadraticEquation.m. If so you just need to rename the file to quadratic.m and ideall...

27 días ago | 0

Answered

Remote matlab running: changing folder and running script

Instead of piping the contents of the file to MATLAB, use the -batch or -r startup options in conjunction with the -sd startup o...

Remote matlab running: changing folder and running script

Instead of piping the contents of the file to MATLAB, use the -batch or -r startup options in conjunction with the -sd startup o...

27 días ago | 0

| accepted

Answered

GA - objective and constraints have to run the same expensive function

One potential solution would be to memoize your expensive function, pass the memoized function into your objective and constrain...

GA - objective and constraints have to run the same expensive function

One potential solution would be to memoize your expensive function, pass the memoized function into your objective and constrain...

28 días ago | 0

Answered

Plotting 2D contours syntax

I am mainly concenred with having the "dot" after the variable. The dot is not associated with the variable, it's associated wi...

Plotting 2D contours syntax

I am mainly concenred with having the "dot" after the variable. The dot is not associated with the variable, it's associated wi...

28 días ago | 0

| accepted

Answered

Deterministic SEIR ODE model running slow

The first thing I'd probably try is to use a stiff ODE solver instead of the nonstiff ODE solver ode45.

Deterministic SEIR ODE model running slow

The first thing I'd probably try is to use a stiff ODE solver instead of the nonstiff ODE solver ode45.

29 días ago | 0

Answered

How do I bin my X and Y data to plot the mean and SD?

X=[1 2 2 3 4 4 4 2 1 3]; Y=[0.1 0.3 0.31 0.36 0.5 6 6 0.32 0.11 0.38]; row = 1:numel(Y); accumarray([row(:), X(:)], Y)

How do I bin my X and Y data to plot the mean and SD?

X=[1 2 2 3 4 4 4 2 1 3]; Y=[0.1 0.3 0.31 0.36 0.5 6 6 0.32 0.11 0.38]; row = 1:numel(Y); accumarray([row(:), X(:)], Y)

29 días ago | 0

Answered

I have issues using datenum function because of a different date format on excel, how can I modify my dates in matlab and then run the function?n

Don't use serial date numbers and datenum. Use datetime instead. s = "12:34:56, 30 08 2022" fmt = "HH:mm:SS, dd MM yyyy"; dt ...

I have issues using datenum function because of a different date format on excel, how can I modify my dates in matlab and then run the function?n

Don't use serial date numbers and datenum. Use datetime instead. s = "12:34:56, 30 08 2022" fmt = "HH:mm:SS, dd MM yyyy"; dt ...

29 días ago | 1

| accepted

Answered

Date time conversion fail

I would like to conver a time to num format so i can do some basic math on it What math do you want to do to the time data? Th...

Date time conversion fail

I would like to conver a time to num format so i can do some basic math on it What math do you want to do to the time data? Th...

30 días ago | 0