Community Profile

photo

Alan Stevens


Last seen: Today 2020 以来アクティブ

Statistics

  • 12 Month Streak
  • Guiding Light
  • Knowledgeable Level 4
  • First Answer

バッジを表示

Content Feed

表示方法

回答済み
How to Approximate The Solution for an Initial Value Problem?
Try f = @(t,x) [x(2); sin(1.9*t)-4*x(1)]; [t,x] = ode45(f,[0,150],[1,0]); plot(t,x)

約15時間 前 | 1

| 採用済み

回答済み
Creating a set range for a function
(x < 3) && (x > 25) An individual element of x can't be both less than 3 and greater than 25 at the same time. If here are ma...

1日 前 | 0

| 採用済み

回答済み
Plotting the tangent line for newton raphson method
Like this? fx = @(x) x.^2 -2; dfdx = @(x) 2*x; n_step = 7 ; % Anzahl der durchzuführenden Schritte für Newtonverfahren...

2日 前 | 0

| 採用済み

回答済み
Fit scatter plot with a curve
More like ths? x = [0.2337;0.296;0.3071;0.4208;0.2055;0.9597;0.8683;0.243;0.3363;0.2793;0.5292;0.2471;0.2282;0.4774;1.0392;0.43...

3日 前 | 1

回答済み
Generating random numbers with a different probabilities
Assuming there are just two levels of probability, and that the numbers are real, not just integers, you could try: p50 = 0.75;...

4日 前 | 1

回答済み
Hi, what does ; exactly mean?
It means start a new row, e.g. x = [1 2; 3 4]; disp(x)

6日 前 | 0

回答済み
Solve the IVP y′′′=sin(y2)+y′+cos(t), provided with an appropriate set of initial conditions of your choice, and using Matlab's ODE45 function.
Like this? (Note the IC for d^2y/dt^2 must be consistent with the values chosen for y(0) and dy(0)/dt). Change the IC's and tim...

16日 前 | 0

回答済み
Need Help Solving System of ODEs
You haven't included the first term on the right-hand side of your equation for dV/dt, nor for dgamma/dt.

17日 前 | 1

回答済み
spring mass using ode45
Like this x0 = [0; 0]; tspan = [0, 10]; [t, x] = ode45(@func, tspan, x0); subplot(2,1,1) plot(t, x(:, 1)); grid('on...

17日 前 | 0

回答済み
I am getting error in this program. Please suggest the corrections.
Change c = [1 2 2 3 4 5 6 7]; to c = [1 2 3 4 5 6 7];

18日 前 | 1

回答済み
Hello, I'm trying to plot one non-piecewise function and two piecewise functions in one graph but I keep getting an error. I don't understand the two error messages below.
You need to put the non-local functions at the end, as in the following. There were several other errors. I don't know if my co...

18日 前 | 0

回答済み
How to Solve equation using Eulers method in Matlab?
Here's part (a) for you - definitely not a straight line!

21日 前 | 0

| 採用済み

回答済み
How to get one output for each input into an equation in MATLAB?
mu = mu_max * (x./(x+Ks)); % Notice it is ./ not just /

26日 前 | 0

回答済み
How to solve 'Index number exceeds number of array elements(1)'
You don't update XSOL, so when ct is 2, XSOL(ct) doesn't exist.

26日 前 | 0

回答済み
A question about FitzHugh-Nagumo model
Like this? tspan = [0 100]; v0 = 0; w0 = 0; IC = [v0 w0]; A=0.5; B=0.05; Epsilon=0.005; I=@(t)sin(t); %%%%%%%%%%%%%%...

26日 前 | 0

| 採用済み

回答済み
How to find parameters that minimize a difference
Use fminsearch and use the norm of the differences. help fminsearch

27日 前 | 2

回答済み
I want to combine 2 variables in matlab into one variable
If they are imported as, say, c1 and c2, then you can simply write c = [c1; c2]; then delete the c1 and c2 if you don't need t...

28日 前 | 0

| 採用済み

回答済み
How can i call an equation and it's derivative inside a matlab function?
Like this, perhaps: % TC is given in terms of percentage! x0=0; TC=10^-4; error=TC+1; i=0; x(1)=x0; while(error>TC) [f...

28日 前 | 0

回答済み
simple Fixed Point Iteration
Probably more like this (though you don't seem to have used function f anywhere): n = 11; x = zeros(1,numel(n)); ea = zeros(1...

28日 前 | 0

| 採用済み

回答済み
I want Estimate log to the base 10 value using 'x' number such that 10^estimated value is equal to or just exceeding x.
< not <= a = log10_bywhile( 50, 0.1 ) b = log10_bywhile( 100, 1 ) function [out] = log10_bywhile(x, inc) esmt = 0; % if...

約1ヶ月 前 | 0

| 採用済み

回答済み
How can I change the value of Y in the columns whare the value of X is zero in matrix ?
Like this XY = [1 5 0 10 3 26 0 5]; XY(XY(:,1)==0,2) = 1.5

約1ヶ月 前 | 1

| 採用済み

回答済み
How to switch to this graph? Mathematical question
Try: plot(x,c,x,1-b)

約1ヶ月 前 | 0

回答済み
multiple equations multiple variables solve command does not work
These equations are linear in the unknowns, so can be solved as follows: % M*X = V where X = [b; d; e] % and the coefficien...

約1ヶ月 前 | 1

回答済み
Is there an error in the if else statement?
Yes, among others! See: L1 = 16.87; %cm L2 = 60.35; L3 = 16.81; L4 = 63.06; L5 = 42.62; L7 = 19.64; theta_1 = 105.47; %de...

約1ヶ月 前 | 1

| 採用済み

回答済み
Solving ODE Boundary Value Problem by Finite Difference Method
I think you just need to change b(i+1) = (w*xi(L-xi))/(2*E*I); to b(i+1) = (w*xi*(L-xi))/(2*E*I); ...

約1ヶ月 前 | 1

| 採用済み

回答済み
Computing the double integral of a surface
Like this syms x y z = @(x,y) x.^2 + y.^2; surface_int = integral2(z,1,2,4,9); disp(surface_int)

約1ヶ月 前 | 0

| 採用済み

回答済み
Mod Euler Method with two ODEs
Like this %Mod_Euler_method Modified Euler's method % [t, w, h] = euler_method(f, a, b, alpha, n) performs Modified Euler's me...

約1ヶ月 前 | 0

| 採用済み

回答済み
im having trouble finding the right values for this codes
This should allow you to find the right values, though it might not be quite the way you were tasked to do it! %Initial Conditi...

約1ヶ月 前 | 0

回答済み
Break the for loop
Something like this perhaps: fib = [1; 1]; its = 0; keepgoing = true; while keepgoing its = its+1; r = rand; ...

約1ヶ月 前 | 0

もっと読み込む