Beantwortet
i dont know why there is no anwser about this 'solve'
Three equations need three unknowns, not only one. clc; close all; clear; a1=20; b1=20; k1=sqrt((a1+10)^2+b1^2)-sqrt((a1-...

mehr als 3 Jahre vor | 0

Beantwortet
Numerical integration of a nested integral; limits of inner integral depend on the outer integration variable
I'm not sure your integral exists ... Bessel_integrand = @(x) x .* besselj(0,x); Integrand_B = @(a) integral(Bessel_integrand,...

mehr als 3 Jahre vor | 1

Beantwortet
Error in plotting a function, left and right side with diferent dimensions
Most probably, vet_servido(j) = - (1/2) * log(1- x_exp(j)); instead of vet_servido(j) = - (1/2) * log(1- x_exp);

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Left division with partially known coefficient
It's a nonlinear fitting problem - backslash doesn't suffice here. I set p = 1/(d*K) . If you like, you can retransform the res...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Why do I get "Array indices must be positive integers or logical values"?
Ta = 504; y = 1.4; Ra = 1716; M = .1:.1:5; for i = 1:numel(M) u(i) = M(i)*sqrt(y*Ra*Ta); end plot(M,u) or simply Ta...

mehr als 3 Jahre vor | 0

Beantwortet
numerical integration theorem of residues
You can define the function to be integrated in a function - you don't need to use handles. In this function, you can perform a...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Integral of matrix determinant
f=@(x)det([1,x;0,2]); integral(f,0,1,'ArrayValued',true)

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
custom logarithmic fit with three coefficients
It doesn't make sense to use three fitting parameters for the function type you supply. a + b*log(c*x) = a + b*log(c) + b*log(x...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
lsqcurvefit for multiple variables optimization
We need your "YL_function" to see what's happening. I wonder whether your transformation is correct. I would have thought y_r...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Absurd result using 'integral2' with non-"centered" functions
It's not possible for integral2 to capture the small peak around 50 to return 1 as result. Use result = mvncdf([-Inf -Inf],[In...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
fminsearch output size bigger than the variables to optimize?
[10000 1000 0.2] instead of [10000 1000 0,2] as the vector of initial conditions. MATLAB is not Excel.

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do I properly use the "while", "for", "loop" command in this problem?
A = [71.213; 74.499; 79.175; 54.163; 83.008; 52.615]; %Column vector B = length(A); %size of column (number of elements) %H =...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
I want to show r^2 and the poly1 ec on the plot
format short g %datos del equipo df=6.1; %cm hf=25; %cm dtr=35; %cm htr=62; %cm %datos del usuario V1=60; V2=0; Vr=V1...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
The method fminsearch() cannot find minimum of quadratic form for 5 variables
The fact that the solvers have the same name under "Octave" and "MATLAB" doesn't mean they are identical - they only have the sa...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Plotting a system of non-linear ODES to model tumour volume.
lotka = @(t,y)[(1.2*(y(1)-0.8))*((1-y(1)-(1-y(1))^(2/3)));1.2*y(2)*(y(1)-0.8)]; t0 = 0; tfinal = 100; y0= [0.5;0]; [t,y] = o...

mehr als 3 Jahre vor | 0

Beantwortet
How do I fix this interpolation error
You can only inverse interpolate if your vector "exprmentresult" is strictly increasing or strictly decreasing. Since it contain...

mehr als 3 Jahre vor | 0

Beantwortet
code is right but can not the a plot
If you compare size(t) and size(u,1), you will find that the number of elements of both vectors are not the same (they differ by...

mehr als 3 Jahre vor | 1

Beantwortet
The Staff Scheduling Problem,Loops Constraints,
Do you want to enlarge the problem size ? If not, why writing 7 clearly arranged constraints in a complicated loop ? But if you...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Error using odearguments (line 95)
For the code to work, x1 in the commands R1new = interp1(SOC',R1',x1); R2new = interp1(SOC',R2',x1); C1new = interp1(SOC',C1'...

mehr als 3 Jahre vor | 0

Beantwortet
I want to plot y vs. B
B >= 1 ? B = 1:0.1:10; y = arrayfun(@(B) 2/sqrt(pi)*integral(@(x)x.^0.5./(B*exp(x)-1),0,Inf),B); plot(B,y) grid on

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how do i solve this equation using matlab
T = @(x,y,z,t) 2*A*P_max*sqrt(alpha)/(k*pi^(2/3)*r^2)*integral(@(u)1./(1+4*alpha*u.^2/r^2).*exp(-(x^2+y^2)./(r^2+4*alpha*u.^2)-z...

mehr als 3 Jahre vor | 0

Beantwortet
How can i integrate an array using the trapz function
Use cumtrapz instead.

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
is the objective function stochastic (-> use something like patternsearch) or deterministic?
Since I add the noise just once a priori to the optimization, my objective function is still deterministic, right? Right, but w...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solving a system of second order ODE backwards
An example: fun = @(t,y) y; [t1,y1] = ode45(fun,0:0.01:1,1); [t2,y2] = ode45(fun,1:-0.01:0,exp(1)); hold on plot(t1,y1) pl...

mehr als 3 Jahre vor | 1

Beantwortet
How to create for loop
You see the reason (see above) ? The degree of the denominator is bigger than the degree of the numerator. Thus k1,k2,k3 and k4...

mehr als 3 Jahre vor | 0

Beantwortet
Why will my multi-dimensional Newton Method not converge?
Your Jacobian is wrong. You didn't specify J(i,i-1),J(i,i+1),J(i,i-N),J(i,i+N). Only computing the diagonal is not sufficient fo...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how to use fsolve for non linear functions with some equations are the same form?
You can solve systems with more unknowns than equations, but in most cases ( as in yours ), the solution will not be unique. Th...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Use Problem-Based Optimize solve the "Or Constraints" problem,which showed in the chapter of "Solver-Based Optimization Problem Setup"
clc,clear prob=optimproblem; x=optimvar('x',2); x0.x=[-0.5,0.6]; fun = exp(x(1)) * (4*x(1)^2 + 2*x(2)^2 + 4*x(1)*x(2) + 2*x(...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Nonlinear curve fitting with summation function
Check again whether fun is correctly defined. I changed ri to rj in the last log expression. % Load data from Excel file data...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Thomas algorithm - tridiagonal matrix
clear cm=1/100; delta = 1*cm; nu=1e-6; Uinf=1; H=2*delta; y=linspace(0,H,40); u=Uinf*erf(3*y/delta); dy=mean(diff(y)); ...

mehr als 3 Jahre vor | 0

| akzeptiert

Mehr laden