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

más de 5 años hace | 0

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

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 1

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

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 1

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 1

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 1

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

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 1

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 0

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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 1

| aceptada

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

casi 6 años hace | 0

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

casi 6 años hace | 1

| aceptada

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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 0

| aceptada

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

casi 6 años hace | 0

Cargar más