Community Profile

photo

Alan Stevens


Last seen: Today 2020년부터 활동

Statistics

  • 24 Month Streak
  • Guiding Light
  • Knowledgeable Level 5
  • First Answer

배지 보기

Content Feed

보기 기준

답변 있음
Inconsistent results from "int" function
You can express '(y*(2*x + y)^2)/192 as (x*y*(x + y))/48+y^3/198 As far as the integral is concerned y is a constant, so the t...

1일 전 | 1

| 수락됨

답변 있음
Boole's Approximation
You are using Boole from -1 to 1, but the "exact" from 0 to pi. (You should plot G against x to see why your "exact" integral w...

4일 전 | 0

답변 있음
I'm trying to solve a system of differential equations using Euler's method, but I don't know what the problem is with my code. If you can correct me the problem
Don't confuse the number 1 with lower case l a= 0; b= 2; delta_x =0.5; y1(1) = 4; y2(1) = 6; n= (b-a)/delta_x + 1 ; x(1)...

4일 전 | 0

| 수락됨

답변 있음
How to add one sgtitle per row of suplots
Try subplot(2,3,1) scatter(62,VWE3a_diff,50,'MarkerEdgeColor','[0 0 0]','MarkerFaceColor','[0 0.5 1]','Marker','o') title('DM...

8일 전 | 0

답변 있음
How to add one sgtitle per row of suplots
Here's a quick and dirty way: x = 0:0.01:2*pi; for i=1:6 y = sin(x+i*pi/4); subplot(2,3,i) plot(x,y) ...

8일 전 | 0

답변 있음
How do you solve a System of 11 Non-Linear Equations Inter-linked to one another?
Here's a possible logic (though I seem to find negative values for U): U1 = 500; U2 = 500; % Initial guesses U0 = [U1 U2]; ...

10일 전 | 0

답변 있음
Title in maths symbol and title as legend on each plot on different locations.
More like this? %% Set up the data (just enough to need a large legend and to show variety) t = linspace(0, 1, 11); x = linsp...

12일 전 | 0

답변 있음
How to show Kinetic energy,potential energy at given ditance
Do you mean something like this: Tf=20; theta=60; height=5000; angle = 45; g=9.81; velocity=(g*Tf)/(2*sind(theta)); figur...

13일 전 | 0

답변 있음
Summation for every value of "n" (or summation with looping)
Like so: B=7.5; % angle value fn = @(n) (1+2*cos(n*B)).^5/2; n=1:50; Qn = fn(n); Q = sum(Qn); Pr= 395; P1= Pr/Q; disp(P1...

14일 전 | 1

| 수락됨

답변 있음
Implementing while loop in Heun's Method
Here's a rough and ready way (I'll leave you to implement Heun's method): f = @(H) -0.06*sqrt(H); H = 4; t = 0; dt = 0.1; %...

16일 전 | 2

답변 있음
How to explain a difference in solutions of integrals between MATLAB and MAPLE?
This is what I get in Maple:

18일 전 | 0

답변 있음
I want to put arrows on each of the lines parallel to x-axis using LOOP
Like this? p = 0.02:.07:1; plot([0; 1],[p; p], 'color','b'); hold on %q = 0.2:.2:1; xx = [0.5 0.57]; ...

20일 전 | 0

| 수락됨

답변 있음
How can I plot this signal?
Like this? gm = 0.04; RL = 10000; CL = 10^(-9); f = logspace(-1,2); Av = (-gm*RL)./(1 + RL*CL*f*1i); %magnitude subplot...

26일 전 | 0

| 수락됨

답변 있음
Hey so I am trying to code an ellipse and I was confused about the placement of my plot. Should it be before the for loop or after?
Something like this? (I've commented out your meshgrid commands as they just confuse the plot and I'm not at all clear why they ...

26일 전 | 0

답변 있음
Using Euler's Method for projectile motion
A little more like this? (I've used arbitrary values for initial conditions etc.) N = 200; % points to be taken g = 9.8; % acc...

26일 전 | 0

| 수락됨

답변 있음
need plot a graph using Euler's method for both numerical and analytical
f = a + (2 - 0.4*a) * x(i) / r^2 * pi; % x(i) not just x. % Also take note of the other comments above.

29일 전 | 1

답변 있음
How can I create a loop to show a table with number of iterations and its roots in secant method?
Possibly like this (though using a while loop would be better): f=@(x) exp(0.5*x)+(5*x); x(1)=0.8; x(2)=0.7; tol=0.0001; ...

약 2달 전 | 0

| 수락됨

답변 있음
Condition for output result
Instead of x1 = x0+B; how about x1 = max(min(x0+B,5.0),0);

약 2달 전 | 0

| 수락됨

답변 있음
Why is my loop not ending?
Shouldn't dp(i+1)= ((6*m(i+1))/(pi*row))^(1/3); be dp(i+1)= -((6*m(i+1))/(pi*row))^(1/3); i.e. have a negative sign in front...

2달 전 | 0

답변 있음
Explicit solution can not be found using dsolve of second order differential equation
Do you have a reason to believe there is an analytical solution to this? It is simply solved numerically, as follows: X0 = [1,...

3달 전 | 0

| 수락됨

답변 있음
i am trying to add a legend for the 0.2% offset line onto the graph, but when i run this, the previous three legend just disappear.
Just put '0.2 offset line' as a fourth item in your other legend command.

3달 전 | 0

| 수락됨

답변 있음
Minimizing an equation to 0
Try fminsearch

3달 전 | 0

답변 있음
Solving for two variable.
In that case one way is to take logs of both sides to get: log(I) = log(I0) + q/(n*k*T)*U then do a best-fit straight line...

3달 전 | 0

| 수락됨

답변 있음
I couldn't plot the function because it seems vector length isn't same, please help me in it.
Try changing n = 100 for i = 1:n to n = numel(time); for i = 1:n-1

3달 전 | 0

답변 있음
How to plot an array graph from a 'for' loop?
Try multiplying i by delta_t in the plot command x(1) = 1; delta_t = 0.1; n = 100; for i = 1:n hold on grid ...

3달 전 | 1

| 수락됨

답변 있음
Display text label on top of grouped bar plots
See answer at your earlier question.

3달 전 | 0

| 수락됨

답변 있음
Solving coupled second order differential equations
Something like this? m1 = 10; m2 = 20; c = 30; k = 5; tspan = [0 1]; ic = [...

3달 전 | 0

| 수락됨

답변 있음
How to create an objective function c(t) to use fminserch , struggle with the summatoin , i used the following code for the optimization but it doesn't seem to work
Do you mean something like this: KT0 = [1, 10]; % initial guesses [KT, C] = fminsearch(@FN, KT0); K = KT(1); T = KT(2); d...

3달 전 | 1

답변 있음
Generate diagram in linear scale
See help polyval

3달 전 | 0

더 보기