Feeds
답변 있음
1) Generate intermediate points in a set of X,Y while respecting the original points order. 2) Generate same number of points for 2 different set of X,Y with different sizes.
Something like this? (I've just used 50 interpolated points for clarity below). Choose your own interpolation type. The "equid...
1) Generate intermediate points in a set of X,Y while respecting the original points order. 2) Generate same number of points for 2 different set of X,Y with different sizes.
Something like this? (I've just used 50 interpolated points for clarity below). Choose your own interpolation type. The "equid...
19일 전 | 0
답변 있음
Trying to figure out a algorithm to filter out some data, since I dont have any additional toolbox.
Here's one possibility, though it isn't a general solution, it just works for this data set load('eeandv.mat') xlo =3.485; xhi...
Trying to figure out a algorithm to filter out some data, since I dont have any additional toolbox.
Here's one possibility, though it isn't a general solution, it just works for this data set load('eeandv.mat') xlo =3.485; xhi...
26일 전 | 1
답변 있음
Solving ODE 45 of chemical reaction mole balance dF/dV
You had the units of R in m^3.atm/(mol.K), but should probably be in L.atm/(mol.K) , since other volumes are in L. Does this lo...
Solving ODE 45 of chemical reaction mole balance dF/dV
You had the units of R in m^3.atm/(mol.K), but should probably be in L.atm/(mol.K) , since other volumes are in L. Does this lo...
4개월 전 | 0
답변 있음
How to determine index for gradient?
"Moreover the matchflag is also false when I try to match the columns which are both equal." This suggests you are comparing ...
How to determine index for gradient?
"Moreover the matchflag is also false when I try to match the columns which are both equal." This suggests you are comparing ...
4개월 전 | 0
| 수락됨
답변 있음
Simpsons 1/3 rule function not working
Are you looking for something like this? a = 1; b = 3; f = @(x) exp(x); n = 6; Ysimp = simp13(f,a,b,n) Yexact = exp(b)-ex...
Simpsons 1/3 rule function not working
Are you looking for something like this? a = 1; b = 3; f = @(x) exp(x); n = 6; Ysimp = simp13(f,a,b,n) Yexact = exp(b)-ex...
7개월 전 | 0
답변 있음
Finding the points where Bessel functions are equivalent
Like this? um = 1e-6; nCore = 1.4682; nClad = 1.446; lam = 1.55*um; k = 2*pi/lam; a...
Finding the points where Bessel functions are equivalent
Like this? um = 1e-6; nCore = 1.4682; nClad = 1.446; lam = 1.55*um; k = 2*pi/lam; a...
8개월 전 | 0
답변 있음
Alternative to ginput for finding curve intersections with unevenly spaced data in MATLAB
Create a function using interp1 for use with fzero. For example: yfn = @(X,Y,x) interp1(X,Y,x); X = [1,2,3,7,8,9]; Y1 = X...
Alternative to ginput for finding curve intersections with unevenly spaced data in MATLAB
Create a function using interp1 for use with fzero. For example: yfn = @(X,Y,x) interp1(X,Y,x); X = [1,2,3,7,8,9]; Y1 = X...
9개월 전 | 1
답변 있음
ode45 not able to solve one particular IVP
How about: y = -3:0.4:3; % pick values of y x = -3:0.4:3; % pick values of x [xg,yg] ...
ode45 not able to solve one particular IVP
How about: y = -3:0.4:3; % pick values of y x = -3:0.4:3; % pick values of x [xg,yg] ...
11개월 전 | 0
| 수락됨
답변 있음
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 ...
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 ...
대략 1년 전 | 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
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
대략 1년 전 | 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*...
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)
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...
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...
대략 1년 전 | 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...
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...
대략 1년 전 | 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...
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...
대략 1년 전 | 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...
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...
대략 1년 전 | 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...
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...
대략 1년 전 | 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...
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...
대략 1년 전 | 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_...
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_...
대략 1년 전 | 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...
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...
1년 초과 전 | 0
답변 있음
How to remove gaps in timeseries plot to have a continuous graph
Include a NaN in the data list between each data set.
How to remove gaps in timeseries plot to have a continuous graph
Include a NaN in the data list between each data set.
1년 초과 전 | 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...
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...
1년 초과 전 | 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...
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...
1년 초과 전 | 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...
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...
1년 초과 전 | 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...
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...
1년 초과 전 | 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.
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.
1년 초과 전 | 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...
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...
1년 초과 전 | 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...
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...
1년 초과 전 | 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...
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...
1년 초과 전 | 0
답변 있음
How do I apply iteration method to an integral?
Look up help on function fzero.
How do I apply iteration method to an integral?
Look up help on function fzero.
1년 초과 전 | 1
| 수락됨



