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

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 1

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

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 1

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 0

Cargar más