Community Profile

photo

Alan Stevens


Last seen: Today
826 2020 이후 총 참여 횟수

Alan Stevens's 배지

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

세부 정보 보기...

참여 게시물
보기 기준

답변 있음
How to avoid repetition in for loop that is using randi
Does randperm do what you want? help randperm

약 15시간 전 | 0

답변 있음
Newton Raphson Method not solving
Try c3=-0.56; c4=0.182; c5=-0.09; c6=0.0102; Et=0.021; fn = @(x) c4*(2*x).^(c3) + c6*(2*x).^(c5) - Et; deriv = @(x) (c3)*...

약 16시간 전 | 2

| 수락됨

답변 있음
Insert comment in the 4th quadrant of a subplot with Label and/or text
Like so? x = 0:0.1:10; y = sin(x); subplot(2,2,1) plot(x,y) subplot(2,2,2) plot(x,y+1/2) subplot(2,2,3) plot(x,y-1/2) s...

약 19시간 전 | 0

답변 있음
Creating and solving a polynomial equal to zero.
Something like this A = [-5000 1200 750 2000 1200; -200 150 60 40 50]; A = fliplr(A); % Do this in order to use the roots fun...

약 19시간 전 | 1

| 수락됨

답변 있음
How can I solve a system of ODE's, in which the equations have a dependency on time, as well as the other ODEs?
By substituting the first into the second and then the second into the third you can write the last two as:

1일 전 | 0

답변 있음
Random dots to make a circle
Try something like n = 1000; t = 2*pi*rand(n,1); Ri = 1; Ro = 2; r = Ri + (Ro - Ri)*rand(n,1); x0 = 0; y0 = 0; x = x0 +...

1일 전 | 0

| 수락됨

답변 있음
PDF & CDF function
Use histogram to see the shape. Move_W_to_dBm has a double peak at low values, with an extremely long tail to the right (I dele...

1일 전 | 0

| 수락됨

답변 있음
I get 'error using sum' whenever I try to get the mean of some numbers.
mean([1.0411, 1.0184, ...etc]) Enclose the numbers within square brackets.

2일 전 | 1

답변 있음
How to fit to an infinite series function when the independent variable contains an undetermined parameter?
fminsearch seems to do ok: x=[0 5 10 15 20 30 45 60 75 90 105 120]; y=[0 3.87 4.62 4.98 5.21 5.40 5.45 5.50 5.51 5.52 5.54 5.5...

2일 전 | 0

| 수락됨

답변 있음
sequence convergence of sqrt(2)
I think you probably want X(k) = 0.5*X(k-1) + 1/(2*X(k-1)); with X(1) = 1;

2일 전 | 0

답변 있음
Goertzel Algorithm for calculating amplitude and angle
Should it be more like this N = 80; % points/period f = 50; % Hz t = 0.02; % s TimeArray = 0:1/f/N:t; x = 2*cos(2*pi*f*Time...

3일 전 | 0

| 수락됨

답변 있음
The forward Euler scheme for an ordinary differential equation
More like this n=100; h=0.1; k=0; x(1)=0; y(1)=48; for k=1:n x(k+1)=x(k)+h; y(k+1)=y(k)+h*(9.8-0.196*y(k)); e...

3일 전 | 1

| 수락됨

답변 있음
Find values that put equation to zero
If your expression is equal to zero, then you can rearrange it to get gamma directly. A little algebra gives gamma = (C-M)./(S...

5일 전 | 1

답변 있음
Finding X values of multiple lines for a given Y value
Never test for exact equality when dealing with floating point numbers. Use something like index_50 = find(abs(t_ind50-consta...

5일 전 | 0

| 수락됨

답변 있음
Normalized histogram with gaussian fit
Here's an example showing one possibility: gaussian = @(x, m,s) exp(-0.5*((x-m)/s).^2)/(s*sqrt(2*pi)); mu = 5; ...

6일 전 | 0

| 수락됨

답변 있음
can you please help me solve this diffetential equation system?
You have log(t) in the definition of B. This causes problems at t = 0.

6일 전 | 0

답변 있음
How to solve an elliptical integral with the unknown in the integrand?
Here's how to use fzero to find C. However, with Re = 100 and alpha = 15deg, the boundary condition integral never reaches 1 fo...

6일 전 | 1

| 수락됨

답변 있음
what is the problem
You need to replace fx by fx=exp(x).*sin(x).^2;

6일 전 | 0

답변 있음
Split Data Into Parts
Aren't there five zones? Identify by something like: z1 = find(oxygenlevel>100,'first'); % index to end of first zone z2 = f...

7일 전 | 0

답변 있음
Creating a function with equation as an input
Like this: %sigma11 refers to 11:==> 1_: First U equation _1: fisrt term in equation. N = 3; % arbitrary value sigma11...

7일 전 | 1

| 수락됨

답변 있음
Coding an Equation to be solved
This should do it, assuming you know the values of the other constants: % Arbitrary data L = 1; rho = 1; A = 1; sigma = 1; ...

7일 전 | 0

| 수락됨

답변 있음
what does this code represents
First two rows of third column of matrix A. For example A = 0.8147 0.0975 0.1576 0.1419 0.6557 0.9058 ...

8일 전 | 2

| 수락됨

답변 있음
How to plot trajectory of angles at varying x, y, and z position
Do you mean something like this (where I've obviously used arbitrary data): x = linspace(0,1,10); y = linspace(0,2,10); z = l...

8일 전 | 0

| 수락됨

답변 있음
Am I implementing the correct code for the ∂2T/∂x2 + ∂2T/∂y2 = 0 ? The slider on the left of the Matlab command window keep vibrating vigorously for over 10 minutes
The following modifications to your code work: L=1; nx=20; ny=20; x=linspace(0,L,nx); y=linspace(0,L,ny); dx=x(2)-x(1); d...

8일 전 | 1

| 수락됨

답변 있음
Using ode45 to solve a Second Order Non-linear ODE
Within your function pend you have function sdot = pend_P(t,s) a=10*(pi/180); b=0; ...etc This resets a and b to the initia...

10일 전 | 0

답변 있음
Convert near zero complex parts to 0
Does the following do what you want yyFix = round(yy*10^n)/10^n; where you choose n as desired.

13일 전 | 2

| 수락됨

답변 있음
Milstein's high order method graph stays at 0
Your line Xmil = Xmil + dt*r*Xmil.*(K-Xmil) + ..... probably needs to be Xmil(i+1) = Xmil(i) + dt*r*Xmil(i).*(K-Xmil(i)) +...

15일 전 | 0

답변 있음
Array indices must be positive integers or logical values.
Look at cos(t(100-i)). When i is 100 this wants t(0). However, indexing starts at 1 in Matlab, not 0.

15일 전 | 1

답변 있음
Different sizing on LHS and RHS
It works ok using fzero, as follows: %set variables To = 330; MF_max = 0.2; L_max= 2.1; G = 1.4; R = 287; f = 0.003; Po...

18일 전 | 0

| 수락됨

Load more