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

plus de 5 ans il y a | 0

Réponse apportée
from Hz to radiant
Yes, though it would be more elegant to use 2*pi instead of 6.28.

plus de 5 ans il y a | 1

| A accepté

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

plus de 5 ans il y a | 1

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

plus de 5 ans il y a | 1

| A accepté

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

plus de 5 ans il y a | 0

| A accepté

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

plus de 5 ans il y a | 1

Réponse apportée
I need HELP. Heat transfer ODE problem with bvp4c
Just upload the pdf as an attachment.

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 1

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

plus de 5 ans il y a | 0

| A accepté

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

plus de 5 ans il y a | 1

Réponse apportée
how to change graph size using quiver, fcontour and hold on
At the end type axis([0 10 0 10])

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to plot data with >2 dimensions?
Look at documentation on plot3

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 1

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

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 0

| A accepté

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

plus de 5 ans il y a | 1

| A accepté

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

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 0

| A accepté

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

plus de 5 ans il y a | 1

| A accepté

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

plus de 5 ans il y a | 0

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

plus de 5 ans il y a | 1

| A accepté

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

plus de 5 ans il y a | 0

| A accepté

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

plus de 5 ans il y a | 0

| A accepté

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

plus de 5 ans il y a | 0

Charger plus