Réponse apportée
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) ....

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to write the codes for this gamma function?
Compare your coded value of 154056.7 with the equation's value of 154.056.

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to round UP to 1 decimal value?
ceil(x*10)/10

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

Réponse apportée
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:...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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.

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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)...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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] = ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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) ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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.

plus de 5 ans il y a | 0

Réponse apportée
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);...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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;...

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
how can i solve nonliner equation?
look at documentation on the "roots" function, (ie type help roots).

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
I am not getting graph for RK4
Looks like you are confusing Y with y.

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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 = [...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to extract non complex number from an array?
A(imag(A)==0)

plus de 5 ans il y a | 1

Réponse apportée
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)...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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];

plus de 5 ans il y a | 0

Charger plus