Beantwortet
Finding parameters by fitting data to a system of ODEs with lsqnonlin
syms T1(t) T0(t) s d g eqn1 = diff(T0,t) == s - (d+g) *T0 ; eqn2 = diff(T1,t) == 2*d*T0 + (d-g)*T1; sol = dsolve([eqn1,eqn2])...

etwa ein Jahr vor | 1

Beantwortet
Can pdepe solve a system of two second-order equations?
Goto https://uk.mathworks.com/matlabcentral/fileexchange/97437-pde1dm download the code, goto folder "documents" and study ex...

etwa ein Jahr vor | 0

| akzeptiert

Beantwortet
Error in flood_algorithm_rtc_pv (line 22) best_fitness = objective_function(best_solution, V_data, I_data); i don not understand this error
V_data and I_data must be of the same size. This is not the case in your code.

etwa ein Jahr vor | 1

| akzeptiert

Beantwortet
Issues solving a system of 2, second order, differential equations with ode45
Replace Cd = 0,45 ;% drag coef aircraft [-] rho_Air = 1,2 ...

etwa ein Jahr vor | 2

| akzeptiert

Beantwortet
simulating rolling 1 and 2 dice
You get a discrete pdf and cdf for the one and two dice-roll experiments you describe. So it doesn't make sense to smoothe resul...

etwa ein Jahr vor | 0

Beantwortet
Very new to this and need help making a contour plot that shows correlation between weight of powder, bullet seating depth, and group size.
What is the problem using the contourf command ? All you need is the matrix MOA - I created it using random numbers. Varget = 4...

etwa ein Jahr vor | 0

Beantwortet
Hello everyone, can anyone provide me the matlab code of FD SLIC algorithm or FM SLIC algorithm
https://uk.mathworks.com/matlabcentral/fileexchange/50184-slic-superpixels-for-e-cient-graph-based-dimensionality-reduction-of-h...

etwa ein Jahr vor | 1

Beantwortet
Eliminate for-loop in recursive computation?
pn_out = cumprod(fact).*(-y).^(m+1) But I'm not sure this will be faster than your loop, especially y.^(1:n) compared to a recu...

etwa ein Jahr vor | 0

| akzeptiert

Beantwortet
What happens if I set both RelTol and AbsTol for ODE45 and/or both TolX and Tolfun for FSOLVE?
Do these functions refine steps, etc. until both requirements are satisfied or only one of them? Both. Read about error contro...

etwa ein Jahr vor | 0

Beantwortet
Which statistic is minimized in curve fitting app
My question is what parameter/statistic is minimized to make a fit? SSE (maybe weighted if you specify weights for the measurem...

etwa ein Jahr vor | 1

Beantwortet
Help with MATLAB symbolic toolbox
Can't you use "dsolve" ? If not, use % Find the value of C1 interm of C2 C1_sol = vpa(solve(yp, C1),4) % Sub C1 into equat...

etwa ein Jahr vor | 0

| akzeptiert

Beantwortet
Find limits satisfying a condition on an integral
x = linspace(0, 2*pi, 20); y = sin(x); lowLimIndex = 1; target = 2; [~,upLimIndex] = min(abs(cumtrapz(x(lowLimIndex:end),y(l...

etwa ein Jahr vor | 0

| akzeptiert

Beantwortet
How plot density of function ?
Your function only depends on x, not on x and y. I'm not sure how you want to make it 2d. Thus I simply defined g(x,y) = f(x)*...

etwa ein Jahr vor | 1

Beantwortet
Problem with lsqnonlin and error function implementing a bovine pericardium constitutive model
strain(1) = 0 - thus you must remove the first data point since you divide by strain(i). Maybe your model function does not all...

etwa ein Jahr vor | 1

Beantwortet
Error on Symbolic calculation : "Empty sym : 0-by-1"
v1 = [393 393 393 393 393 393 393 393 393 393 ; 3850 4340 4760 5320 5740 6160 6580 7140 7980 8960]; v2 = [408 408 408 408 408 4...

etwa ein Jahr vor | 0

Beantwortet
Erron on Symbolic calculation [Case 2] : "Empty sym : 0-by-1"
If Λ is some kind of maximum likelihood function you try to maximize, I suggest you use "mle". We had this problem already - I ...

etwa ein Jahr vor | 0

Beantwortet
cosine of a matrix returns weird values.
"cos" and "tan" can be applied to angles in radians, not in degrees. Use "cosd" and "tand" instead.

etwa ein Jahr vor | 0

| akzeptiert

Beantwortet
How can I use Createpde to solve a fourth degree partial differential equation?
You have a system of two second-order differential equations. Thus instead of defining one equation, you have to define two and ...

etwa ein Jahr vor | 1

Beantwortet
mono- objective optimization and multiopjective optimisation, I would like to use GA with option but there is a fault that I can't to resolve
You mean objective = @(x) 1.002 - ((1 - exp(-0.00003 * x)) ./ (0.00003 * (x + 1.5) + 0.00063 * (1 - exp(-0.00003 * x)))); a = ...

etwa ein Jahr vor | 0

Beantwortet
How to place random CNT's in a box domain with random curves and orientation ?
https://uk.mathworks.com/matlabcentral/fileexchange/93250-generate-thick-fibers?s_tid=srchtitle

etwa ein Jahr vor | 0

Beantwortet
how to use fmincon to optimize a functio with more than one control vector where the control vectors used in constrains also?
If all three vectors/matrices are to be treated as solution variables for "fmincon", use v = [p(:);X(:);L(:)] It's useful to t...

mehr als ein Jahr vor | 1

Beantwortet
Double Integration of Numeric Data - Acceleration -> Displacement
Assuming x(0) = v(0) = 0 in both cases, I get load("A2.mat") load("A9.mat") a2 = Datashort1; a9 = Datashort21; figure plot...

mehr als ein Jahr vor | 0

Beantwortet
Find real valued parameters of a complex equation/model by using optimization or curve fitting.
I don't know if this helps to get better results, but of course you have to fit real and imaginary part of mu_eff simultaneously...

mehr als ein Jahr vor | 0

| akzeptiert

Beantwortet
Storing while loop results in an array and plotting
Why do you think the results you get from the second part of your code are wrong ? g = 10; y(1) = 100; v(1) = 0; t(1) = 0; ...

mehr als ein Jahr vor | 0

| akzeptiert

Beantwortet
how to solve this error? Objective function is returning undefined values at initial point. FSOLVE cannot continue.
In the computation of c0,...,c10, you divide by x(3),...,x(13), thus by 0 because x0 = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] . After ...

mehr als ein Jahr vor | 0

Beantwortet
4th order Runge - Kutta vs. 4th order Predictor - Corrector
%--- Exercise 1 - A %--- Solving the diff. eqn. N'(t) = N(t) - c*N^2(t) with c = 0.5 using %--- Euler's method, Runge - Kutta ...

mehr als ein Jahr vor | 0

| akzeptiert

Beantwortet
4th order Runge - Kutta vs. 4th order Predictor - Corrector
For k>4, the variable RKN should no longer appear in the equations PredN(k) = PredN(k-1) + h/24*( 55*f(t(k-1),RKN(k-1)...

mehr als ein Jahr vor | 0

Beantwortet
Runge - kutta 4th order method for two different steps
y(j+1) = y(j) + h(i)*(K1 + K4 + 2*(K2 + K3))/6; instead of y(j+1) = y(j) + (K1 + K4 + 2*(K2 + K3))/6;

mehr als ein Jahr vor | 0

| akzeptiert

Beantwortet
Error using surf (line 71) Z must be a matrix, not a scalar or vector.
Works for me (assuming that FL_hat is 1001x1001 in your case): alpha = linspace(0, 2*pi, 51); beta = linspace(0, 2*pi,21); FL...

mehr als ein Jahr vor | 0

| akzeptiert

Beantwortet
How to avoid the warnings on my code
%--- Solving the diff. eqn. y'(t) = y(t) - c*y^2(t) with c = 0.5 using %--- Euler's method, Runge - Kutta method, and predictor...

mehr als ein Jahr vor | 1

| akzeptiert

Mehr laden