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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 1

| accettato

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

quasi 6 anni fa | 1

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

quasi 6 anni fa | 1

| accettato

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

quasi 6 anni fa | 0

| accettato

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

quasi 6 anni fa | 1

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 1

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

quasi 6 anni fa | 0

| accettato

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

quasi 6 anni fa | 1

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

quasi 6 anni fa | 1

| accettato

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 1

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

| accettato

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 0

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

circa 6 anni fa | 0

| accettato

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 0

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 0

| accettato

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

circa 6 anni fa | 0

| accettato

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

circa 6 anni fa | 0

Carica altro