Plotting a circle on top of a trisurf graph.
I have solved a finite element problem, and I am using trisurf to plot the result. However, I want to specify a circular patch c...
10 months ago | 1 answer | 0
Why does my ODE solver go slow when I specify the Jacobian
Hello, I have a code that uses ode15s to solve a stiff ode system. The RHS is of size 32. I realized that when I specify the J...
10 months ago | 0 answers | 0
How can I make my ODE system run faster
options = odeset('mass',BigM,'MassSingular','no','BDF','on','MaxOrder',2,'Jacobian',... @(t,u) MyJacobian(t,u,MM_params, R...
11 months ago | 1 answer | 0
How to randomly choose 5% of a matrix to be of value 1.
I have a 256 x 256 matrix which has value 1 inside a small square 20 x 20 around the center, and zero elsewhere. I need to rando...
3 years ago | 1 answer | 0
How to terminate an if-elseif-else statement once a condition is met.
I want a situation whereby if the first 'if' statement is true (norm_sn <= del), the code should calculate x_plus and exit the i...
4 years ago | 1 answer | 0