# Torsten

**Statistics**

**MATLAB Answers**

**0** Questions

**4 084** Answers

RANK**22**

of 265 485

REPUTATION**9 886**

CONTRIBUTIONS

**0** Questions

**4 084** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**1 110**

RANK

of 18 135

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

RANK

of 116 829

CONTRIBUTIONS

**0** Problems

**0** Solutions

SCORE**0**

NUMBER OF BADGES**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

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 ...

ungefär 3 timmar 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')

ungefär 8 timmar 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...

ungefär 8 timmar 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);

ungefär 11 timmar 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.

ungefär 11 timmar 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, ...

ungefär 15 timmar 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...

ungefär 15 timmar 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...

ungefär 15 timmar 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...

ungefär 16 timmar 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...

ungefär 16 timmar 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...

ungefär 16 timmar 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...

en dag 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]; ...

en dag 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...

en dag 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...

en dag ago | 1

how to plot this function?

f = @(x) abs(x)<=pi/2; x = linspace(-pi,pi,200); plot(x,f(x))

en dag 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...

en dag 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...

en dag 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.

en dag ago | 1

| accepted

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

Transpose the theta vector.

en dag 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...

en dag ago | 0

How to use the SUM() function..?

Did you create a MATLAB function with name sum.m ? If yes, rename it.

en dag 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...

en dag 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 ...

en dag ago | 0

Solve system of equations with two unknowns (should be the smallest rational number possible)

Easy for a,b real: a = b = sqrt(k). More involved for a,b rational. For a,b real it can be solved as an optimization if you d...

2 dagar ago | 0

How to calculate the intersection point of lines on a loglog graph.

eprime=0.59; sigmaprime=277500; %Constants for Manson Coffin Equation b=-0.087; c=-0.58; %Young's Modulus E=30*10^6; ...

2 dagar ago | 1

| accepted

i need to get my variable y to vary....as its a key variable for this entire system. i cant seem to find a way. would you help me in that regard...

In x0, set y to the value you want. In PBR, set dxdW = [dnNO_dW; dnH2_dW; dnN2_dW; dnH2O_dW; dnN2O_dW; dnO2_dW; 0.0; dT_dW]; ...

2 dagar ago | 0

Calculate the area and volume of revolution based on some data points

y = [0,38.161563,39.751307,40.878082,42.701189,44.524296,45.047229,45.990198,46.933167,46.785121,... 46.225562,41.318857,36...

2 dagar ago | 2

| accepted

How to use "poissrnd" function?

lambda = 4 What is the unit of lambda ? Mean number of arrivals per minute ? And you want to get a random vector for arrivals...

3 dagar ago | 0

Store prime and non-prime numbers

x=[1:50]; x=x'; jj=0; %index for prime_num nn=1; %index for nonprime_num p=[]; np=[]; np(1) = 1; for i=2:length(x) i...

3 dagar ago | 1

| accepted