Answered
why my code keeps showing not enough input argument when i try to publish?(get a ans and there is nothing about error but when I publish there it is
You had a couple of minor issues - see code below (which now works): [root,vals,numiters,ierr] = my_bisect(@(x) cos(x)-x , 0 ,1...

5 years ago | 0

Answered
from Hz to radiant
Yes, though it would be more elegant to use 2*pi instead of 6.28.

5 years ago | 1

| accepted

Answered
Error in ODE45 when using ...................... >> [t,x] = ode45(@odefcn,tspan,[0 0]);
The first approach needs to be structured as follows: a=-1; b=-2; c=0; u=3; tspan = [0 20]; [t,x] = ode45(@odefcn,tspan,[0 0]...

5 years ago | 1

Answered
how to find unknowns for series of input values?
Do you mean you want to find the values of x and y that satisfy 2*x*2 - 3*y*4 = 100? If so you should be aware that there are a...

5 years ago | 1

| accepted

Answered
Changing constant with timespan in ode45 solver
Make x a function of t and call it from the function defining the rate equations ode45 is calling..

5 years ago | 0

| accepted

Answered
Sorting and replacing data in matlab
Here's one way: A =[ 1, 0, 3, 4, 5, 6, 7, 8, 0, 0,15, 20, 10, 9]; c1 = 0.1; a = 0.01; ix = find(A>5); for i = 1:numel(ix) ...

5 years ago | 1

Answered
I need HELP. Heat transfer ODE problem with bvp4c
Just upload the pdf as an attachment.

5 years ago | 0

Answered
For loop running n times wont work
You have for n = .2:2 ... But then call [Tatm(n),Tsurf(n)] ... However, the indices to Tatm(n) etc must be integers, not 0....

5 years ago | 0

Answered
Polar plot using polyfit
I'm somewhat confused by your question and don't understand the need for all the flip commands! However, does the following mee...

5 years ago | 0

Answered
I need HELP. Heat transfer ODE problem with bvp4c
You have an initial condition problem rather than a boundary condition problem (where you know values at the start and end x val...

5 years ago | 1

Answered
Computing terms of a sequence generated by a nonlinear difference equation
Must be the fact that you are using symbolic maths. Without that it's fast (as long as you specify a value for alpha of course)...

5 years ago | 0

| accepted

Answered
FitzHugh-Nagumo model
Like so: % Replace the following constants with your own values tspan = [0 1]; % start and end times v0 = 0; w0 = 0; % initi...

5 years ago | 1

Answered
how to change graph size using quiver, fcontour and hold on
At the end type axis([0 10 0 10])

5 years ago | 1

| accepted

Answered
How to plot data with >2 dimensions?
Look at documentation on plot3

5 years ago | 0

Answered
I want to make a recursive formula and execute two statements with the same variables at the same time
I'm obviously not understanding something here (not unusual!),. Doesn't the following do what you want: a = 1; b= 0; n = 5; ...

5 years ago | 0

Answered
I want to make a recursive formula and execute two statements with the same variables at the same time
What about a temporary variable for b: ... bt = b; b = [a]; a = [a bt]; ...

5 years ago | 1

Answered
How to plot an Explicit function with inseparable
having set values of Ibar you could find Pbar using function fzero. Like so: Ibar = 1:0.001:2; pbar = zeros(1,numel(Ibar)); ...

5 years ago | 0

Answered
Can I have a title over a section of subplots?
Something like this perhaps x = 0:0.1:6; y1 = sin(x); y2 = sin(2*x); y3 = cos(x); y4 = cos(2*x); subplot(2,2,1) plot(x,y1...

5 years ago | 0

Answered
Find five correct decimals of temp at x
How about using T1 = interp1(x,T,1); Use a finer mesh of x values if the result isn't satisfactory.

5 years ago | 0

Answered
Correlation between two signals
I don't see why you shouldn't use a Pearson r correlation: A = a - mean(a); B = b - mean(b); r = A*B'/ (norm(A)*norm(B));

5 years ago | 0

Answered
Euler Method System of ODE solving
Your function, f = @(t,y) ... has vector y with just three components, but you call it in your Euler routine with i = 4 ... y n...

5 years ago | 0

| accepted

Answered
I am trying to solve a 2nd order non linear differntial equation with 2 boundary conditions . Please help me write the code.
Here's one way of doing this (obviously, you need to replace my arbitrary constants with your proper values): % Data (replace ...

5 years ago | 1

| accepted

Answered
ode1 error Euler's method
Apart from the fact that you forgot to put "end" at the end of the function (the "end" of the "for" loop doesn't count), there i...

5 years ago | 0

Answered
I am trying to apply the steps attached to the pdf file into my code
Your function starts with function d = my_det(A) but, nowhere within it is there any calculation of d, so the function doesn't...

5 years ago | 0

| accepted

Answered
the calculation of the eigenvector
You seem a little confused about eigenvalues and eigenvectors. The following code might provide some clarification: B = [0.606...

5 years ago | 1

| accepted

Answered
The roots for an equation containing tangent
If x*1.4 - atan(0.28*x)=37.5 is the equation then fixed point iteration will work. Rewrite the equation as x(n+1) = (37.5+atan...

5 years ago | 0

Answered
Need to solve ode equation which are dependent
Your equations can be manipulated as follows Equations (1) and (2) can be solved directly as functions of z. Equations (3) a...

5 years ago | 1

| accepted

Answered
solving 2nd order nonlinear ode Numeric solution by using ode45
This is the basic structure for solving the ode. u0 = 2; v0 = 0; tspan = [0 5]; k = 1; a = 25; [t,U] = ode45(@odefn, ts...

5 years ago | 0

| accepted

Answered
how to solve the below equation where current solution is the initial condition for the next iteration
You can substitute your expression for u into your ode and rearrange to get dydt = ... in terms of parameters that don't have u ...

5 years ago | 0

| accepted

Answered
Putting multiple ODE equations into one script
In v = x(1); b = x(2); dvdt(1) = (ps.v_in - v(1)) - (ps.k .* ps.area .* ps.delta_P); dbdt(1) = (ps.b_in - b(1))/ps.tau; v a...

5 years ago | 0

Load more