Community Profile # Torsten

Last seen: Today Active since 2013

#### Statistics

• • • • • #### Content Feed

View by

Provide Jacobian matrix to ode15i for solving DAE system
y0 = [1; 0; 1e-3]; yp0 = [0; 0; 0]; options = odeset('RelTol',1e-4,'AbsTol',[1e-6 1e-10 1e-6], 'Jacobian', @Jac_robertsidae); ...

24 minutos ago | 0

Define a variable on a spline
n = 3; n1 = n-1; a = 20; b = 10; P = [0 b;0 0;a 0]; x = P(:,1); y = P(:,2); T ...

alrededor de 3 horas ago | 0

bisection method error symbolic
syms y q=20; g=9.8; b=3+y; ac=3*y+y^2/2; f= 1-q^2/(g*ac^3)*b; x1=0.5; xu=2.5; hold on fplot(f,[0.5 2.5]) grid on f =...

alrededor de 3 horas ago | 0

| accepted

Bvp4c Unable to solve the collocation equations -- a singular Jacobian Encountered
clc; p = 0.01; Betaf = 207; Betas = 17; Beta = 0.5; kof = 0.613; kos = 400; m = 1; b2 = 0.5; b1 = 0.5; G1 = 5; G2 = 5...

alrededor de 5 horas ago | 0

| accepted

Using euler's method to plot x(t) graph
You pass "ICs(z)" and "timeVector" to "eulersub". In the function, they get the names a and b. But a and b are never referenced ...

alrededor de 17 horas ago | 0

How to solve this without syms x
fun = @(x) x.^2./(1+sqrt(x)) ; sol = fzero(@(x)fun(x)-2,10); x = 0:0.1:4; plot(x,fun(x),sol,fun(sol),'o')

alrededor de 21 horas ago | 0

My code is outputting very illogical answers for the second block (my second vector loop equation).
% given values R1 = 59.7; R2 = 18.8; R3 = 41.0; R4 = 40.1; R5 = 136.4; R6 = 11.9; R7 = 15.6; R8 = 11.7; Rgi = 13.1; Re...

alrededor de 21 horas ago | 0

Graph not being displayed
./ instead of simple / : x=linspace(-5,5,130); y=(2*x.^2-2*x-1)./(x.^4+1); plot(x,y);

1 día ago | 0

| accepted

Euler Integration Step Size Change
Only integer values can be used for array indexing. The loop must run from i=1 to i=5000 instead.

1 día ago | 0

| accepted

How can i plot dy/dx function?
xspan = (30:0.1:900); y0 = 0; options = odeset('RelTol',1e-12,'AbsTol',1e-12); [x,y] = ode15s(@(x,y) odefun(x,y), xspan, y0, ...

1 día ago | 0

What is wrong with the function code when it can work perfectly without function code
Works for me. [k,p,err,P] = fixpt(@(x) sin(x)-1,-1,0.00001,100) function [k,p,err,P] = fixpt(g,po,tol,maxi) % g is the functi...

1 día ago | 0

| accepted

Error tolerance in matlab
The ode integrators try to guarantee a predefined error tolerance when solving your system of ordinary differential equations. I...

1 día ago | 0

How do I go by this in Matlab?
%************ Variable declaration****************** rng('default') t = -20:0.1:20; n = 1000; % number of realizations signa...

1 día ago | 0

| accepted

how can I plot the fourier series of this function by calculating the coeffcients and for different n?
Note that the function f you defined is even - thus it must be cos(n*x), not sin(n*x) that appears in the Fourier series. x = l...

1 día ago | 0

| accepted

How can I define two function in function handle for GAMULTIOBJ?
Since the functions are that long, better keep them separated. But use func=@(x) [efficiency(x),LCCfunc(x)]; instead of func...

1 día ago | 0

| accepted

Is my matlab code for the sinc signal below correct.
%************ Variable declaration****************** rng('default') t = -20:0.1:20; signal = zeros(1,length(t)); %for spped a...

1 día ago | 1

| accepted

Help with 'fmincon' fucntion for optimsation
Your problem is linear. You might want to try "linprog" instead of "fmincon". m = 6; a =[.75,0.75,0.85,0.8]; x0 = [0,0,0,0]; ...

2 días ago | 2

| accepted

System of Nonlinear Equations exceeds function evaluation limit
Substitute a = x(2)*cos(x(3)), b = x(2)*sin(x(3)), c= x(1)*cos(x(3)), d=x(1)*sin(x(3)) in your equations. You get an underde...

2 días ago | 0

How do you analytically solve PDE's in Matlab for example the 1-D Poisson Equation
Usually, PDEs cannot be solved analytically in MATLAB. Your "PDE" is a simple ODE with solution phi(x) = 1/2*x^2 + a*x + b with...

2 días ago | 1

how to plot this function?
f = @(x) abs(x)<=pi/2; x = linspace(-pi,pi,200); plot(x,f(x))

2 días ago | 0

how to derivate a polynomial with x , y and z terms
how polyder function would work in this case? Your function is not a polynomial ; thus it doesn't work. "polyder" works on vec...

2 días ago | 0

A question for orth
Can you get an integer vector for the orthonormal basis of range(A) (thus with length 1) ? Answer: No. Further, range(A) is not...

2 días ago | 0

How to modify built-in function tolerance for 'lsqcurvefit'?
FunctionTolerance and StepTolerance are the parameters in the options-structure you can play with.

2 días ago | 1

| accepted

I need to multiply each element of a vector of five values by another vector 2000 values.
Transpose the theta vector.

2 días ago | 0

| accepted

Hello Matlab! I would love to find a solution to this error
Something like this ? f = @(a,b) (cos(3.86*a)+cos(3.86*b)); g = @(a,b) (cos(1.93*a)*cos(1.93*b)); T = @(a,b)[2.86*sqrt(6)+2.5...

2 días ago | 0

How to use the SUM() function..?
Did you create a MATLAB function with name sum.m ? If yes, rename it.

2 días ago | 0

Count occurances on multidimensional matrix with multiple criteia on different dimnesions
A = zeros(3,4,2); A(:,:,1)=... [90 95 90 80 70 90 95 70 60 90 90 60]; A(:,:,2)=... [1 1 1 1 2 2 2 2 1 2 1 1]; occur...

2 días ago | 0

Prolate spheroid surface area
I calculated the surface area of a sphere of radius 1 which should be 4*pi. The below formula from WolframAlpha seems to work ...

2 días ago | 0