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

5 years ago | 1

| accepted

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

5 years ago | 0

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

5 years ago | 0

| accepted

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

5 years ago | 1

| accepted

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

5 years ago | 0

| accepted

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

5 years ago | 0

| accepted

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

5 years ago | 1

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

5 years ago | 1

| accepted

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

5 years ago | 0

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

5 years ago | 0

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

5 years ago | 0

| accepted

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

5 years ago | 0

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

5 years ago | 0

| accepted

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

5 years ago | 0

Answered
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] = ...

5 years ago | 1

| accepted

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

5 years ago | 0

| accepted

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

5 years ago | 0

Answered
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);...

5 years ago | 0

| accepted

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

5 years ago | 0

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

5 years ago | 0

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

5 years ago | 0

| accepted

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

5 years ago | 0

| accepted

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

5 years ago | 0

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

5 years ago | 0

| accepted

Answered
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 = [...

5 years ago | 0

| accepted

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

5 years ago | 1

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

5 years ago | 0

| accepted

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

5 years ago | 1

| accepted

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

5 years ago | 0

Answered
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];

5 years ago | 0

Load more