Question


How can I improve this really slow code, which consists of several nested for loops?
Hi, So I've written these nested for loops, but it takes a very long time to execute this code: for T = linspace( 1, 5, 1...

meer dan 4 jaar ago | 1 answer | 0

1

answer

Question


In nested for-loops, how and where should I set the counting index (indices?) correctly, for doing numerical root-finding using fsolve?
Hi, Let's say I have a function, f, that maps R^3 to R^3, and I want to find its multivariable roots numerically, using fsol...

meer dan 4 jaar ago | 1 answer | 0

1

answer

Question


What information is conveyed by the different colors in Matlab's contourf( ) data plots?
Hi, Matlab has a contourf( ) function, which I used a little bit last night to plot the level sets of say, Z = f(x,y) = ...

meer dan 4 jaar ago | 1 answer | 0

1

answer

Question


Inner matrix dimensions must agree error message,
Hi, I'm getting an error message that says inner matrix dimensions must agree, but I checked both matrices and they seem fin...

meer dan 4 jaar ago | 1 answer | 0

1

answer

Question


Do vector fields mapping R^2 to R^2 have to be coded in separate function files, or can I define anonymous functions for them directly in the script file?
Hi, I've been writing functions from R^2 to R^2, i.e. F( f_1(x,y), f_2(x,y) )= (z_1, z_2), in separate function files, and th...

meer dan 4 jaar ago | 1 answer | 0

1

answer

Question


What is considered good practice for coding up a function's derivatives, e.g. its Jacobian and Hessian matrices?
Hi, I'm currently practicing numerical root-finding, using simple sets of nonlinear equations and writing my own solvers -- ...

meer dan 4 jaar ago | 1 answer | 0

1

answer

Question


Debugging Newton's Method code in two variables,
Hi, I wrote a simple code for Newton's Method in two variables but am having some trouble debugging it. Here's the message ...

meer dan 4 jaar ago | 1 answer | 0

1

answer

Question


How to get Matlab to return answers with ten-digit accuracy?
Hi, Answers returned by Matlab (e.g. from the ode45 solver, or from the wrapTo2Pi function that maps accumulating angles to [0,...

meer dan 4 jaar ago | 2 answers | 0

2

answers

Question


fsolve handling a composition of functions gives the error, "not enough input arguments"
I'm having some trouble using fsolve on a composition of functions. I've tried fsolve on a much simpler composition, and it wor...

meer dan 4 jaar ago | 2 answers | 0

2

answers

Question


How can I create elliptical-shaped markers?
I have two columns of data [X Y] that I would like to plot with elliptical-shaped markers.

meer dan 7 jaar ago | 1 answer | 0

1

answer

Question


How accurate is the numerical integrator, cumtrapz?
How accurate is the numerical integrator, cumtrapz?

meer dan 7 jaar ago | 1 answer | 0

1

answer

Question


how can I rotate the ellipses based on the orientation angle of (x_i,y_i)?
I would like to rotate the ellipses to show the orientation, theta, of the centered data points.

meer dan 7 jaar ago | 2 answers | 0

2

answers

Question


how can I center my data
I would like to draw an ellipse, and then center my data points on these ellipses.

meer dan 7 jaar ago | 1 answer | 0

1

answer

Question


"Inputs must be floats, namely single or double"
system of equations is: F = @(t, r, y) [y(1), y(2), y(3), f_integral] And then calling the ode solver: [t, y] = ode45(F...

meer dan 7 jaar ago | 1 answer | 0

1

answer