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

casi 4 años hace | 0

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

casi 4 años hace | 0

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

casi 4 años hace | 1

| aceptada

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

casi 4 años hace | 0

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

casi 4 años hace | 1

| aceptada

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

casi 4 años hace | 1

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

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 0

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

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 0

| aceptada

Respondida
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([...

casi 4 años hace | 1

| aceptada

Respondida
second expression and second statement doesn't excuted in else if ?
In an if / elseif / else statement like this: %{ if condition 1 do some calculation 1 elseif condition 2 do some ca...

casi 4 años hace | 0

| aceptada

Respondida
Displaying exponential notation with num2str?
Another function that might be of interest to you is formattedDisplayText, if you want to capture how the variable would be disp...

casi 4 años hace | 0

Respondida
"find" yields different results for linear vs 2D indexing
You don't need to use find. You don't care where the elements that satisfy your criteria are located, all you care about is that...

casi 4 años hace | 1

| aceptada

Respondida
Calling a Function specific from a ToolBox
The function you indicated you wanted to call is only called in the event that the first input argument is either "a SeriesNetwo...

casi 4 años hace | 0

| aceptada

Respondida
how to insert same scalar as length of something?
If you want to replicate the scalar in B to be the same size as A, you can use repmat. If you know that B will always be 0, inst...

casi 4 años hace | 0

| aceptada

Respondida
I got the error of incorrect argument data type or missing argument in call to function 'gamma'.
The gamma function in MATLAB requires its input to be a floating-point number, specifically the input must be "Data Types: singl...

casi 4 años hace | 0

Respondida
What could these numbers mean?
This doesn't look related to MATLAB or MathWorks products at all, but this looks like a nonogram.

casi 4 años hace | 0

| aceptada

Respondida
Using a boolean operation to assign specific values for each threshold
Use the discretize function.

casi 4 años hace | 0

| aceptada

Respondida
what is wrong in this code not executing .??????Error: File: ifSf.m Line: 2 Column: 22 Invalid expression. Check for missing multiplication operator, missing or unbalanced del
To clarify what @Stephen23 and @Chunru said, when you define a function all the input arguments that you specify must be either ...

casi 4 años hace | 0

Respondida
My first user-input prompt is to enter a number (say, x). What should I write if my next message box MUST contain the same number of prompt questions as x?
I'd use a string array. I'm going to hard code the value of n to keep this example simple, but you could query for it using a di...

casi 4 años hace | 1

| aceptada

Respondida
Can't make .exe file from Appdesigner that include simulink model
See this page from the documentation for Simulink Compiler for an example of how to deploy a standalone application that calls a...

casi 4 años hace | 0

| aceptada

Respondida
to create a loop to assign names
If you're just using this to obtain the name of the variable in the workspace from which your function was called, use inputname...

casi 4 años hace | 0

Respondida
Error using matlab.internal.math.checkDataVariables Invalid grouping variables.
The second input for the groupsummary function as you're calling it should be the name of a variable in your table. "stormData.R...

casi 4 años hace | 0

Respondida
How to draw rectangle with coordinate, height and width provided?
You could call the patch function, or if you need to draw a large collection of rectangles you could create one polyshape then u...

casi 4 años hace | 0

Respondida
how should i contact my administrator to get my license key?
Go here to see if your college or university has a campus-wide license. If you do I suspect it will be able to tell you how to a...

casi 4 años hace | 0

Respondida
Is it possible to adjust the maximum step size ('MaxStep') while an ode15i solver is running according to a certain value?
If you know the times at which you want to change functions and/or initial conditions ahead of time, run ode15i repeatedly for s...

casi 4 años hace | 0

| aceptada

Respondida
Control other applications using MATLAB
It depends. One relatively easy approach would be if the application you're trying to control has a COM interface you can use in...

casi 4 años hace | 0

Cargar más