Page 1 of 1

Multiplier Function making Matlab crash

Posted: Fri Nov 22, 2024 1:24 am
by mariacoral
Hi!

I've been working on a model on Matlab, and noticed it was crashing a lot. When trying to isolate the issue, I got to the conclusion that the multiplier function I added is the one causing it. What I've noticed is that the first time I run it, it doesn't cause any issues, but after a few tries, it crashes. I've checked the forum for some solutions, but up until now I haven't been able to solve it. I've been testing it with a simple function like this:

Code: Select all

LinearF =LinearFunction(1,0);
MultFunction= MultiplierFunction(LinearF , 2);
I also tried to clone the function when using it as an input for the multiplier function, but it's still crashing:

Code: Select all

LinearF =LinearFunction(1,0);
MultFunction= MultiplierFunction(LinearF.clone() , 2);
Thank you for the help,
Maria C.