Beantwortet
non linear implicit equation
Surprisingly, this has an explicit solution for y (I didn't use Matlab to get it as I don't have the symbolic toolbox to hand) ....

mehr als 5 Jahre vor | 1

| akzeptiert

Beantwortet
How to write the codes for this gamma function?
Compare your coded value of 154056.7 with the equation's value of 154.056.

mehr als 5 Jahre vor | 0

Beantwortet
Poisson Boltzmann eq. with an infinite boundary condition
I suspect the initial gradient required to get zero at infinity is an irrational number (or possibly a rational number with a la...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
How to solve s system of coupled nonlinear ODES already given the state vector
You need to solve for all xdots simultaneously - this is done in matrix format below. There were also a number of errors in you...

mehr als 5 Jahre vor | 1

| akzeptiert

Beantwortet
How to round UP to 1 decimal value?
ceil(x*10)/10

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
Generate and Plot N Points Picking Random Points on Triangle
More like the following; rng('shuffle'); n = 1000; % Set number of points as desired % Let (0,0) be vertex 1, (0,2) be verte...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
Finding the streamlines of a complex potential for a Joukowsky transform from a unit circle to a flat plate.
x=0:. There was a strange vertical line that O thought was related to this. However, you could put it back and see if it makes a...

mehr als 5 Jahre vor | 1

Beantwortet
Finding the streamlines of a complex potential for a Joukowsky transform from a unit circle to a flat plate.
There are some typos in the paper by Smith et al, and some steps left out. I think the following generates figure 18: x = [-2:...

mehr als 5 Jahre vor | 1

| akzeptiert

Beantwortet
How to do write the codes for this summation problem?
Having defined n and T then B = 1./(log(T) - mean(log(T))); Note that in Matlab, log is log to base e.

mehr als 5 Jahre vor | 0

Beantwortet
how to graph this system of questions into mathlab
You can define the function as follows f = @(v) (-0.001778*v.^2+0.05333*v).*(v<30); The (v<30) part simply multiplies the rest...

mehr als 5 Jahre vor | 0

Beantwortet
Initialize values at time = 0
You probably want to replace if (lambda(:,1) == lambda(1,1)) & (lambda(:,2) == lambda(1,2)) by if (lambda(r,1) == lambda(1,1)...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
ode arguments error in function
For the last line in your function you need dYfuncvecdW = [dXdW; dydW]; Notice the semicolon after dXdW Also your plot comman...

mehr als 5 Jahre vor | 0

Beantwortet
How do I solve Time dependent parameter in ODE
Perhaps your code needs to be structured more along the following lines; tspan = ..... y0 = ..... options = ..... [t, ymod...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
How to plot min and max values on graph
If you meant you want to highight all the peaks and troughs then the following will do it (assuming you haven't got the findpeak...

mehr als 5 Jahre vor | 0

Beantwortet
Plotting a rankine half body
Try this m=3; %strength U = 20;%positive x-axis %Mesh for fourth quadrant and corresponding stream value function [X1,Y1] = ...

mehr als 5 Jahre vor | 1

| akzeptiert

Beantwortet
Integration by numerical methods
Something like this: z = 0.01:0.01:1; I = zeros(1,numel(z)); for i = 1:numel(z) I(i) = integral(@(x) sqrt(x)./(exp(x)./z(i) ...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
Can someone help me write out this equation for chi-square please
As long as y, m and err_y have the same number of elements then your expression should work ok.

mehr als 5 Jahre vor | 0

Beantwortet
How to solve two coupled differential equations using ode45.
The following should help: % tspan = [0 tend]; % IC = [1 0 0]; % initial conditions % [t, X] = ode45(@fn, tspan, IC);...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
Index in position 2 exceeds array bounds (must not exceed 14).
Odd! It works for me: >> C(1,1)= 1; C(1,10) =-1; C(1,16) = 1; C(2,2) = 1; C(2,10) = 1; C(2,11) =-1; C(3,3) = 1; C(3,11) = 1;...

mehr als 5 Jahre vor | 0

Beantwortet
how to find a root of polynomial using matlab
Or directly y = sqrt(2)*atan(-1/3);

mehr als 5 Jahre vor | 0

Beantwortet
How to give input function dz/dt=Z*omega*cos(omega) to state space system?
Do you mean something along these lines: tspan = [0 2]; % Or whatever you need IC = [1 0]; % Set your own initial conditi...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
how can i solve nonliner equation?
look at documentation on the "roots" function, (ie type help roots).

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
I am not getting graph for RK4
Looks like you are confusing Y with y.

mehr als 5 Jahre vor | 0

Beantwortet
How do I solve this bvp4c error ?
You have a division by sinh(k) .../(2*sinh(k)))... Since k is zero, sinh(k) is zero and the resuting expression for vel is NaN...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
Simulate a 2-input linear system with with ode45
More like this: tspan = [0 50]; x0 = [0; 0; 0]; u = [10; 10]; [t,x] = ode45(@(t,x) odefun(t,x,u),tspan,x0); x = x'; My = [...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
How to extract non complex number from an array?
A(imag(A)==0)

mehr als 5 Jahre vor | 1

Beantwortet
Adding Labels to PDE Graph
One way is to do the following with your plot command: plot(x,sol); lg1 = ['t = ',num2str(t(1))]; lg2 = ['t = ',num2str(t(2)...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
How can I get values for n=500, 1000 and 2000 ? only getting values for n=4000!
Your assignments T.Euler_1(p) = abs(init_cond(1) - z(end,1)); etc. are all outside of the for p = ... loop, hence they just re...

mehr als 5 Jahre vor | 1

| akzeptiert

Beantwortet
why this error ??
You have defined x as a 1x25 vector, but you are calling it with two arguments. You need to call it with x(n), rather than x(1,n...

mehr als 5 Jahre vor | 0

Beantwortet
How to find x-values when y-function equals a set value?
With your particular function you can get both values of x immediately from x = b1 + c1*sqrt(log(a1/0.7))*[1, -1];

mehr als 5 Jahre vor | 0

Mehr laden