photo

Alan Stevens


Last seen: Today 2020 年からアクティブ

Followers: 1   Following: 0

統計

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

バッジを表示

Feeds

表示方法

回答済み
Erro ao usar matlab.internal.math.interp1 Os pontos de amostra devem ser exclusivos.
Well, this gets it working, but you need to check your function equilibrio as it doesn't cross zero until T is between 3400 and ...

21日 前 | 0

回答済み
Generate a vector with elements based on certain elements in another vector
Like this? A = [0;0;0;0;0;1;1;1;1;1]; B =zeros(size(A)); ptr = find(A==1); B(ptr(1):ptr(1)+2)=1

23日 前 | 1

回答済み
Solving the problem for the free extremum of a function of several variables - numerical determination local minimum.
Here's a "starter for ten" with the Newton-Raphson method: % Newton-Raphson Approach % Function f = @(x,y)x^4+5*x^2-9*x^2*...

約1ヶ月 前 | 0

回答済み
Finding max value of 1D vector when all values could be negative
Try [M, I] = max(abs(DD)) M = DD(I)

約1ヶ月 前 | 0

| 採用済み

回答済み
Issue with correct Fanno parameter when using flowfanno function.
fL/D suggests the Darcy-Weisbach friction factor is being used. 4fL/D suggests the Fanning friction factor is being used. (T...

約2ヶ月 前 | 0

回答済み
Using Runge Kutta to solve second-order differential equations with two degrees of freedom
Like this? omega = 0.05:0.05:20; tspan = [0 2*pi]; xmax = zeros(1,numel(omega)); for i = 1:numel(omega) X0 = [0...

約2ヶ月 前 | 0

回答済み
Changing the value of only one parameter causes a problem (possibly with while loop)
You can see from the following that when i = 3, 4 and 7, V(i) stays at a constant value greater than Vmax %% Constants and Assu...

約2ヶ月 前 | 0

回答済み
Why is the set of numbers p2 not showing up on my graph
Should it be more like this? (Though I don't recognize the value you have for the gas constant; and temperature would normally b...

2ヶ月 前 | 0

回答済み
Reproducing Water Defect Mode Plot in MATLAB (Only Getting 0.1748 Transmittance Instead of Sharp Peak of 1)
The size of the peak is very sensitive to the increments in your lambda range: n_Si = 3.465; % Refractive index of Si n_SiO...

2ヶ月 前 | 1

| 採用済み

回答済み
I'm trying to solve jeffry hamel equation using RK4 but it's not giving output as expected.
The following code produces something very close to the plot that you want to see. However, the values of g(1) are nowhere near...

3ヶ月 前 | 1

| 採用済み

回答済み
i try to put two plot in one graph using legend but one of them just looks been 'cut off', can someone help me to fix this problem
Plot both curves the same way (i.e. t then x)! x0=2.1; g=9.81; k=45; m=7; t=0:0.1:6; x1=@(t) x0*cosd(t*(sqrt(k/m))); x_t_...

3ヶ月 前 | 0

回答済み
Implementation of the analytical expression for the magnetic field of a circular current loop and interpretation/representation of the results
When I run it I get different signs as well as slightly different magnitudes: %% Analytical calculation of the magnetic field o...

4ヶ月 前 | 0

回答済み
How to remove gaps in timeseries plot to have a continuous graph
Include a NaN in the data list between each data set.

4ヶ月 前 | 0

回答済み
what the reason behind roundoff error inside while loop
Compare the following dt = 0.1*16^-1; t = 0; while t<1 t = t+dt; end disp(t) t = 0; c = 1; while t<1 t = c...

4ヶ月 前 | 0

回答済み
Something doesn't work for me in fit
Here's a fit using fminsearch (I just used a quick but coarse approach- the code can be made much cleaner!). v=[10 30 5...

4ヶ月 前 | 0

回答済み
Plotting while skipping the middle point in a vector
Something like this? tic v1 = [1 2 3 4 5 8 9 10 20 21 22 30 31 32]; dv = diff(v1); ix = find(abs(dv)>1); v = []; s2 = 0; f...

5ヶ月 前 | 1

| 採用済み

回答済み
help with nested loop and plot
Here's another way, still using nested loops: n= 101; x = linspace(-100, 100, n); y = linspace(-100, 100, n); [X, Y] = meshg...

5ヶ月 前 | 0

| 採用済み

回答済み
How to integrate an implicit acceleration function to a fitting pair of graphs of velocity and displacement
Look up ode45 for the integration (for a fixed set of parameters) and fminsearch for fitting the parameters to known data.

5ヶ月 前 | 0

回答済み
Brush: How can I change the font color of the displayed X and Y range?
Select the Property Inspector, select the text, choose a color. (The following code is just to get the image uploaded) I=imrea...

6ヶ月 前 | 0

回答済み
how to use an integral function inside a for loop? i need to find the value of function that chages as i chages .then using this values i need to find another integral.
Are you looking for something like this? r0 =0.1; u =[1:7]'; Q =zeros(length(u),1); E =zeros(length(Q),1); Q = @(x)0.023*(r...

6ヶ月 前 | 0

回答済み
Simpson integral - problem with writing the formula
Should be x(i) etc. not a(i). Also be careful with brackets. % Test 1 a = 0; b = 1; n = 10; f = @(x)1-x+x.^3; I = simpson(f...

6ヶ月 前 | 0

回答済み
How do I apply iteration method to an integral?
Look up help on function fzero.

7ヶ月 前 | 1

| 採用済み

回答済み
How can I plot a reflection angle of a projectile in a kinematics model? Overlay projectile motion plots?
Surely you only need to reverse the x-velocity? imperialBallVelocity = 52.20; release_angle = 42; release_height = 64.2; %Ki...

7ヶ月 前 | 1

| 採用済み

回答済み
Why am I receiving this error?
You have 4 layers layer_angles = [45, -45, -45, 45]; but data for only three mid_plane_strains = [0.05, 0.00, 0.00]; % Mid-p...

7ヶ月 前 | 0

回答済み
Function g Returns Only 2 Values Instead of Array - Vectorized Operation Issue in MATLAB
You have g as a function of x2, but x2 doesn't appear on the right-hand side!

7ヶ月 前 | 0

| 採用済み

回答済み
Solve for x with given equation
Look up the help on function fzero. And don't forget that Matlab doesn't recognise implicit multiplication. x(...) should...

7ヶ月 前 | 0

回答済み
power method with rayleigh coeff
Make sure you call the function with the arguments in the same order as those defined in the function! A=[4 1 -1 0;1 3 -1 0;-1 ...

7ヶ月 前 | 0

| 採用済み

回答済み
Fill area between two vertical curves
Like this: value = [186.7646 198.4115 191.1406 180.8430 175.7136 ... 167.7459 151.2865 144.5964 139.8148 139.4305 188.2865 204...

8ヶ月 前 | 2

| 採用済み

回答済み
Simplificar el resultado como valor numerico
Why not simply: p1=[2;3] ; x0_1=@(theta) [cos(theta); sin(theta)]; % =[x1*x0; x1*y0] y0_1=@(theta)[-sin(theta); cos(theta)];...

8ヶ月 前 | 1

回答済み
Optimizing code for HAC Weight matrix generation - How to be faster?
Try replacing the loops with something like this: i = (1:size(Weight_correlation,1))'; j = 1:size(Weight_correlation,2); c = ...

8ヶ月 前 | 0

| 採用済み

さらに読み込む