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

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

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

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

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

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

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

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

24 días ago | 0

Answered
How to get user homepath?
Does getenv do what you want?

24 días ago | 0

| accepted

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

24 días ago | 0

Answered
Creating funcing in spesific formats
Take a look at the format function.

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

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

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

24 días ago | 0

| accepted

Answered
Renaming .mat file
Use the movefile function.

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

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

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

26 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)

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

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

27 días ago | 0

Answered
Animated line and moving markers with different, changing colors
I advise you not to use handle as a variable name, as it already has a meaning in MATLAB. When you call scatter, since you didn...

27 días ago | 1

| accepted

Answered
where can I get the supporting file "helperViewDirectionAndDepth.m" for Monocular Visual Simultaneous Localization and Mapping?
If you have a sufficiently recent release of Computer Vision Toolbox installed, click the Copy Command button on that example pa...

28 días ago | 1

Answered
matrix operation to scalar
Don't overwrite your vector variable with a scalar value then attempt to use it as though it were still a vector. If you have a...

29 días ago | 0

| accepted

Answered
OOP: objects as properties of objects; objects with no methods; objects with no properties?
Is it OK to store other objects as properties of an object? Yes, but you will need to be careful in certain situations (most no...

29 días ago | 0

Answered
Extract subgraph using names
I'd use a string array, both when naming the nodes initially and when extracting the subgraph. B = bucky; n = height(B); G = ...

alrededor de 1 mes ago | 0

| accepted

Answered
Cleaning string and reaction time data
I suspect that the standardizeMissing and/or fillmissing functions will be of interest to you.

alrededor de 1 mes ago | 0

| accepted

Answered
svd(X,"econ") does not work as expected if X is square nxn matrix with rank<n
If you want a number of singular values fewer than the maximum number, consider using svds. Though for a tiny problem like this ...

alrededor de 1 mes ago | 0

| accepted

Answered
can we plot convergence of a ode solver same as fsolve?
I think what you may be looking for is the OutputFcn. See the entry in the Name-Value Arguments section on the odeset function d...

alrededor de 1 mes ago | 0

| accepted

Answered
Can I make addpoints function show me more than one curve in ONE figure ?
So you want multiple animated lines in the same figure? That's easy, just use multiple animatedline objects. x = 0:360; axis([...

alrededor de 1 mes ago | 0

| accepted

Load more