Answered
No InputFormat 'YYMMDD' found for datetime
Either leave the quotes off but use == (if you're using a sufficiently recent release) or add quotes. You will need to adjust yo...

2 years ago | 1

| accepted

Answered
EdgeCallBack and node manipulation in graph (replacement for lost biograph functionality)
For your first comment, could you explain in a little more detail how you used the edge callback to "break bad connections/edges...

2 years ago | 1

Answered
smart function to switch functions
If you're using a sufficiently recent release (release R2023b or later) use the ode object and specify the Solver property to te...

2 years ago | 0

Answered
I keep getting a “cannot convert double value “…” to a handle. Does anybody know how I can fix my code in order for this to go away
Seeing the screenshot of the code helped me understand the problem. Note in your multipulcationButtonPushed method (you misspel...

2 years ago | 0

Answered
Multiplication of High Dimensional Matrices
Either reshape or permute your matrix into a 6-dimensional array whose first four dimensions are singletons. Then use times. Her...

2 years ago | 0

Answered
How to determine if an object is a built-in class?
Okay. You could achieve your stated goal without actually having to ask "Is this an instance of my class or an instance of some ...

2 years ago | 0

Answered
Force super class to not call overloaded methods of the subclass
You can call a superclass method even if the subclass overloads or overrides that method only from within that method itself. So...

2 years ago | 0

Answered
I get the illegal instruction error while running an iterative matricial method on the Matlab code in PC
This sounds like it may be Bug Report 1043644. But FYI the combination of the release of MATLAB you're using and the operating ...

2 years ago | 0

Answered
error in envelope function
Let's make sure you're using the findpeaks function included as part of Signal Processing Toolbox. What does this command show w...

2 years ago | 1

| accepted

Answered
dictionary() question: "Error: Output argument not assigned a value in the execution with 'x' function" - works with some inputs and not others even though code is identical.
What value is assigned to the output argument variable numout if the value in the input argument variable convtype doesn't match...

2 years ago | 0

| accepted

Answered
Vector norms not interacting with dlarrays as documented
According to the Release Notes, support for dlarrays in vecnorm was added in release R2023b.

2 years ago | 0

| accepted

Answered
Matlab logic of plotting meshgrid formula
See this documentation page for a description of the difference between the * and .* operators (and similarly / and ./, etc.)

2 years ago | 0

Answered
Create a solid line instead of single points in the plot
Rather than plotting individual points inside a loop (as @VBBV and I both suspect you are doing) you could pull the plot command...

2 years ago | 0

Answered
Modifying the search path is not supported by Matlab Compiler?
See the "Do Not Rely on Changing Directory or Path to Control the Execution of MATLAB Files" section on this documentation page....

2 years ago | 0

Answered
Incompatible Sizes for ode45 Output Assignment
Rather than plotting the orbit after the fact, why not use an OutputFcn to plot while the ODE solver is solving? The ballode and...

2 years ago | 0

Answered
How can I write a set of first order ODEs with two variables?
In this case, the second input to your ODE function will have four elements. Using a slight variant (to avoid using y in two dif...

2 years ago | 1

| accepted

Answered
Create Class that is both Heterogeneous and a Handle class
I am looking to create a class that is both a handle class object which allows reference copies of that first object to be distr...

2 years ago | 0

| accepted

Answered
how to convert text file as it was written .m file to call functions?
If all the text in the file consists of valid MATLAB code and comments, just change the extension from .txt to .m.

2 years ago | 0

Answered
datetime adjustment in x-axis plot
Stop using datenum. If you have the text form of a date and time, use datetime instead of creating a serial date number array. Y...

2 years ago | 1

Answered
Why is it that Line objects can be instances of two different classes? How can I use findobj to detect only chart primitives?
Handle Graphics objects support the creation of heterogeneous arrays. So for example you can store a figure handle and an axes h...

2 years ago | 2

| accepted

Answered
How to sort table more than one variable with specified condition ?
See the "Sort Rows of Table by Variables" example on the documentation page for the sortrows function.

2 years ago | 0

Answered
Can't get matrix to populate first column
The smallest value in z is 1. Because you add 1 to z to generate z1, that means the smallest value in z1 is 2. You use z1 to det...

2 years ago | 0

Answered
description of highlighted code
From the variable names and the signature, this looks like a function you wrote or were given as part of solving a system of ODE...

2 years ago | 0

Answered
Possible to iterate over table rows without a loop index variable?
To perform an operation on all rows of a table array you could use rowfun, but that isn't the same as writing a general for loop...

2 years ago | 0

| accepted

Answered
pcregistericp using GPU Support
Note that "GPU Code Generation" and "GPU Arrays" are two different Extended Capabilities. For example, in MATLAB there are 200 f...

2 years ago | 1

| accepted

Answered
ode45 invalid parameter 981/100
When you call odeFunction with g as part of the third input, it is not a symbolic variable. You originally defined it using syms...

2 years ago | 0

| accepted

Answered
I need to Fix an Error For Lines 34 & 126
Let's look at your cal_obj function. function z = cal_obj(A,B,MB) n = length(MB); z = 0; for i = 1:n z = z + B(MB(i))*A(i);...

2 years ago | 0

Answered
I get an error using fsolve but I don't understand why?
Look at the description of the fun input argument on the documentation page for the fsolve function. The relevant part of that d...

2 years ago | 0

| accepted

Answered
Problem with solve() and "Empty sym: 0-by-1".
Let's look at the systems of equations you're trying to solve. Ax = [0 1 0 0; 0 -0.1 0 0.8; 0 0 -4 9; -1 -9 2 -8]; Bx = [0 0 0...

2 years ago | 1

Answered
Error using fclose in MATLAB on Mac: "Invalid file identifier. Use fopen to generate a valid file identifier.
When you call fopen you should call it with two output arguments and check if the first is -1. If it is, that means MATLAB and/o...

2 years ago | 0

Load more