Réponse apportée
how to change color for one point in the scatter plot
a=[1:10]'; b=[11:20]'; scatter(a,b,'o','filled'); hold on plot(a(5),b(5),'ro','MarkerFaceColor','r')

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
help using ODE45
Your temp equation can be written as the following three equations dx2dt = k1*dx4dt + k2*dx6dt + k3 dx4dt = k4*dx2dt + k5*dx6d...

plus de 5 ans il y a | 1

Réponse apportée
ode45 For Three Functions
Well, this is how you could structure it all in one file % What will happen to the population of bees in 12 months? Months or y...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Plotting multidimensional discrete Data
Presumably, for every combination of rpm and torque you are able to calculate an efficiency, so you should be able to use contou...

plus de 5 ans il y a | 0

Réponse apportée
Stop the iteration loop at desire Ea
Like so %cinitial = input('\nGive the initial value of c : '); % Inputs initial value of x cinitial = 1; iterations = 0; ...

plus de 5 ans il y a | 0

Réponse apportée
What is wrong with the code ?
Remove the i = i+1; that immediately follows the while ,,, instruction. otherwise, first time in to the loop you are trying ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Helix model with radius
This is what your (unmodified) code produces for me:

plus de 5 ans il y a | 0

Réponse apportée
i need use division methob
A little more like this perhaps (note the way the function, f, is defined): f = @(x) x.^3- 0.2*x.^2 - 0.2*x - 1.2; a0=1; b0...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Plotting the derivative of a non symbolically defined function
You could just do it totally numerically: phi0 = 0; dphidt0 = 5; IC = [phi0 dphidt0]; tspan = 0:0.1:20; v = 1:10; phi = ze...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
MATLAB - Delay sine wave
Like this? N=250; Fs=20; Ts=1/Fs; t=(0:N-1)*Ts; A = 3; f = 1; signal = @(t) A*exp(-t).*sin(2*pi*f*t); x = signal(t);...

plus de 5 ans il y a | 0

Réponse apportée
How I can to realize this function
Use indexing: Parabula = @(n) n.^2; n = -2:6; y = Parabula(n); y(n<1 | n>5) = 0; stem(n,y) axis([-10 10 0 30])

plus de 5 ans il y a | 0

Réponse apportée
rolling a dice 1000 times
mod not modulo. functions must come last in a script. for n=1000:1003 [win,avg]=dice(n); disp(['No. of wins ',int2st...

plus de 5 ans il y a | 0

Réponse apportée
Finite Difference method solver
By differentiating c' again you can solve the resulting second order ode as follows c0 = 1; v0 = 0; IC = [c0 v0]; tspan ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
erlang c coding, can someone fix this coding for me? i keep getting error and I don't know what's wrong. Thank you in advance
Change for k=0:N_C(i) sum = T_tr.^N_C(i)/factorial(N_C(i))++(1--(T_tr/N_C))+sum+T_tr.^k/factorial(k); ...

plus de 5 ans il y a | 1

Réponse apportée
how to fix error in line 10 of the codes
f = 1./(1+25*(x.^(2))); % Notice the dots: ./ and .^ for element by element division and raising to a power.

plus de 5 ans il y a | 0

Réponse apportée
Newton Raphson method - Symbolic function
You have a = vpa(subs(df,x,i)); b = vpa(subs(f,x,i)); k_New = k-a/b; % but this is k - diff(f)/f ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Intersection of a linear and a non linear equation with Newton Raphson method
Change linear = a*x+b; to linear = @(x) a*x+b; and plot(root, linear, '*'); text(root, linear, '\leftarro...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Plotting diffusion eq.
Your x values are far too large! Try x = (0:0.01:1)*10^-7; %%%%%%%%%%%%%%%%%%% t = [100 200 300]; c = 10^(-6); D = 10^(-...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
undefined function or variable x
Like so (the function must come last in the script): % solution of second-order differential equation % the function diff2(x,y...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to do Differential Equation Solution and plotting in matlab ? Please Help
Like so b1 = 1; a1 = 1; %t = 0:0.1:5; tspan = [0 5]; % a pulse function % plot to y0 = 0; y10 = 0; IC = [y0 y10]; %...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Evaluating a function at complex values
You need to make sure F is a function. For your particular function you don't need it to be symbolic: >> F =@(x) x^5-5*x^4-8*x...

plus de 5 ans il y a | 0

Réponse apportée
How can I write a code that works like MS Excel "Goal seak"?
What about fzero? Your code could be structured like p90 = ... % put initial guess here p9_1 = fzero(@(p) fn(p, XSteam), p90)...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Can i trasform a complex double into euler representation
Can you use abs and angle? >> a = -14.6566171621163 + 0.495320247582976i; b = -0.459846284143683 + 0.100914051723435i; c = -6...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Code Won't Finish running
Use ode15s instead of ode45. Also, you might as well set the timespan to be [0 0.1] as nothing much changes after that!

plus de 5 ans il y a | 0

Réponse apportée
Creating a loop that performs actions for each set of values linked to a unique (but random) ID
Does this help: %% Setup the Import Options and import the data opts = delimitedTextImportOptions("NumVariables", 9); % Spe...

plus de 5 ans il y a | 1

Réponse apportée
Solving a PDE using Method Of Lines
The crucial lines requiring changes are [t c] = ode15s(@TracerFlow,tspan,IC,[],Nz,CA0init,dz,Da,U,k) % Recalculation C(:,1) =...

plus de 5 ans il y a | 3

| A accepté

Réponse apportée
How to superimpose certain indices of matrices.
Here's one possible way (there are probably slicker ways!): K111 = K1(1:3,1:3); K112 = K1(1:3,4:6); K121 = K1(4:6,1:3); K122 ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Partial derivative can anybody help me to slove this ?
Presumably you know density and saturation pressure as a function of temperature, either as functions or as data tables. This m...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
BVP for system of 2 second order ODEs
Here is how you can express your second order equations as first order ones You should now be able to express your boundary c...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
It follows the END that terminates the definition of the function "NumIntF" error
Put xi = 0; xf = pi; % or whatever your desired start and end values are. f = NumIntf(xi,xf) in a script and run that - it ...

plus de 5 ans il y a | 0

| A accepté

Charger plus