Beantwortet
Epicycloid curve calculating arch length using integral method
curvelength = vpaintegral(sqrt(diff(x,t)^2+diff(y,t)^2),t,0,T)

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Find the value from the integral equation
fun = @(w,m0) (cos(4*w).*cos(4*w)+1)./(1+exp(w-m0)); m0sol = fsolve(@(m0)integral(@(w)fun(w,m0),-20,20)-2,1) integral(@(w)fun(...

mehr als 3 Jahre vor | 1

Beantwortet
How to match indices of a matrix and how to define functions correctly in matlab
As you can see, Xnew is a 2x2 matrix. You want to assign a matrix to a vector in pos(i,:)=Xnew; which is not possible. Trace...

mehr als 3 Jahre vor | 0

Beantwortet
maximisation of the utility function , portfolio optimization
Calculate W1*Rt1, W2*Rt2,...,W4*Rt4. Let Wi*Rti be maximum. Then (assuming gamma < 1) x_i = 1, x_j = 0 for i~=j is optimal.

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Are there any restrictions on the Mass matrix for solving a DAE system using ode23t?
There are no restrictions on the mass matrix for ode23t or ode15s except for that it cannot be the zero matrix (which would mean...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Solving a non-linear system of equations
syms a b c d eq1 = ((a^2 * b) / (c^0.6 * d^0.7)) * 1.5 == 0.007484; eq2 = a + b + c + d == 1; eq3 = (((2*a) + (2*c)) / (b + c...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
x values when taking a numerical derivative
Use n = numel(y); dydx(1) = (y(2) - y(1))/(x(2) - x(1)); dydx(2:n-1) = (y(3:n) - y(1:n-2))./(x(3:n) - x(1:n-2)); dydx(n...

mehr als 3 Jahre vor | 0

Beantwortet
How do I make a column vector to add to my original matrix?
What about B = [4;-1;0] ?

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to find the orientation of the line of the intersection between two planes?
If you look at the next lines in Matt's code, he creates 100 points on the line. Thus in the modified code below, Pstart could ...

mehr als 3 Jahre vor | 2

Beantwortet
BVP4c for three boundary set of boundary conditions
You didn't try to understand the code I provided for the similar problem, did you ? You still supply 6 initial conditions altho...

mehr als 3 Jahre vor | 1

Beantwortet
Adding more boundary conditions to pdepe
So my question is that is it possible to set BCs at a and b. It depends what boundary conditions you want to set. If it is simp...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
implicit function ,differeation
syms x y(x) D2y eqn = x + sin(y)/2 - y == 0 d2eqn = diff(eqn,x,2) d2eqn_subs = subs(d2eqn,diff(y,x,2),D2y) D2y = solve(d2eqn...

mehr als 3 Jahre vor | 0

Beantwortet
How to solve a second-order BVP with multiple boundary conditions?
How do I change the regions' definition and bvp function setup so that only 6 boundary conditions are required? For every equat...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
I defined a function that should give me an array with 3 elements, but when I use it it's giving me a lot more than 3.
Maybe you mean V0=10; mu=0.4 ; tf=1; [t,x,N] = lab1(V0,mu,tf); hold on plot(t,x) plot(t,N) hold off grid on functi...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to find the normal vector on a Plane in 4d and above?
It's a vector orthogonal to P2-P1, P3-P1 and P4-P1 (which all lie in the plane), thus e.g. P1 =[252716585.970010 -136769230.769...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
vpasolve unable to find solution of 6 simultaneous equations
A corrected version of the last part of your code would be Alt = 6562 * 0.3048; %Altitude (m) M = 6300; %Aircraft mass (kg) p...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Multiplying two 3-dimensional matrices
A = rand(30,64,4); B = rand(64,30,4); for i = 1:size(A,3) C1(:,:,i) = conj(A(:,:,i))*B(:,:,i); C2(:,:,i) = B(:,:,i)*conj...

mehr als 3 Jahre vor | 0

Beantwortet
Attempting to perform the Runge-Kutta-Fehlberg Algorithm
A partial answer is given by the code below - your test ODE is solved correctly with fixed time stepsize. Errors in your origin...

mehr als 3 Jahre vor | 1

Beantwortet
How to pass extra parameters to ODE event function?
In the same way as you pass parameters to other functions: options = odeset('Events',@(t,y)myEventsFcn(t,y,params)); functio...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to curve fit custom equation with sigma function
Look at the example Fit a Custom Model Using an Anonymous Function under https://de.mathworks.com/help/curvefit/fit.html to ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Method of Lines 2D
This line is wrong T(2:99, 2:99) = y; because of the error message given.

mehr als 3 Jahre vor | 1

Beantwortet
How to solve Multivariate equations
%Scripte illustre les valeurs de phi et s %script Méthode Newton-Raphson (for 2 variables) clear, clc disp('NEWTON-RAPHSON M...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
problem with matrix is singular
I think you forgot to close the k-loop before the definition of H. What is the matrix A ? It's not defined in your code.

mehr als 3 Jahre vor | 0

Beantwortet
Optimization single nonlinear equation to fit predicted data to actual data
"nonlcon" as the nonlinear constraint function from "fmincon" can constrain a*p1(i)^w * p2(i)^y * p3(i)^z as well, if this is wh...

mehr als 3 Jahre vor | 0

Beantwortet
Defining objective functions appropriately
Usually, you maximize the corresponding log-likelihood function. So it's a maximization problem. To maximize, use one of MATLA...

mehr als 3 Jahre vor | 0

Beantwortet
Global fitting two functions with shared parameters and variable, which fits two different data sets, respectively
Two data sets Adata and Bdata which are physically different properties and has values that are completely different in digits (...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Plot Population growth function with different values of b using for loop
f = @(t,b,d,N0) N0*exp((b-d)*t); t = 0:0.1:10; N0 = 400; b = [0.1 0.001].'; d = 0.001; plot(t,f(t,b,d,N0)) grid on

mehr als 3 Jahre vor | 1

Beantwortet
Maximum perpendicular distance between lines
x = [120 150 180 210 240 270 300 330 360]; % power y= [ 1.4000 1.3000 1.3000 1.4000 1.7000 2.400...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
fzero with two variables and an array of elements in a loop
p.V1=1e-7; AA=@(y,T) 4e17.*exp(-25619./T).*(y-0.02).^2./(0.2-y).^3; BB=@(y,z,T) 5e7.*(0.6+2e-5.*T.*log(AA(y,T)./A(z,T))+1.154....

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
OPTIMIZATION BY GA toolbox
https://de.mathworks.com/help/gads/gamultiobj.html

mehr als 3 Jahre vor | 0

Mehr laden