Beantwortet
Integrating the density function of Brownian motion
Maybe it helps to resolve the integration with respect to t: syms t T real positive syms x real g = 1/sqrt(t)*exp(-x^2/t); i...

etwa ein Monat vor | 0

Beantwortet
Helmholtz problem in circular disk
According to your code, data(i,j) is a zero of besselj(j-1,x) in the interval [(i-1)*pi i*pi]. So let's plot besselj(1,x) and b...

etwa ein Monat vor | 1

Beantwortet
How to build a graph using stem for a given equation?
Since your delta function does not support array inputs, you must use something like x1=a1*arrayfun(@(n1)delta(n1-b1),n1) inst...

etwa ein Monat vor | 1

Beantwortet
How do I code a Hamiltonian Cycle in an undirected weighted graph?
I didn't test it yet, but maybe this one from the File Exchange: https://uk.mathworks.com/matlabcentral/fileexchange/51610-hami...

etwa ein Monat vor | 0

Beantwortet
Find critical points of parametric function
The critical points are solutions of a polynomial of degree 6 in z. There is no solution formula for roots of polynomials of deg...

etwa ein Monat vor | 1

| akzeptiert

Beantwortet
Central and Forward difference schemes heat conduction for two-layer materials
heattransfer() function heattransfer xstart = 0; xend = 1; xinterface = 0.25; xmesh1 = linspace(xstart,xinterface,25); xme...

etwa ein Monat vor | 0

| akzeptiert

Beantwortet
Average Optimization using GA or intlinprog algorithms
https://uk.mathworks.com/matlabcentral/answers/2063957-optimization-problem-with-array-input?s_tid=srchtitle

etwa ein Monat vor | 0

Beantwortet
how to ues the exponentials and derivatives in bvp4c
yp1 = deval(S,1) ym1 = deval(S,-1); T1= exp(-b1*(1+m))*ym1(4); T2= exp(-b1)*yp1(4); N1= -(1+b2*(1+m))*ym1(5); N2= -(1+b2)*y...

etwa ein Monat vor | 0

| akzeptiert

Beantwortet
Nonlinear time dependent 2D system of PDE's
I doubt there is a software capable to handle this kind of PDE system automatically. You will have to discretize the spatial d...

etwa ein Monat vor | 0

Beantwortet
How could I have these two erros when I did everything right (otherwise)?
c_p defined in your script does not mean that it is also visible in your functions. Either define the functions as nested funct...

etwa ein Monat vor | 0

Beantwortet
Problem with solving two differential equations depending on each other
Since W0 = 0, you get Re = 0 and thus lambda = something undefined (you divide by Re !). What does the c stand for in dm^3/c fo...

etwa ein Monat vor | 0

Beantwortet
How to plot function with different first x values?
I = @(R)0.5*(R>=0 & R<10)+5/R*(R>=10 & R<=100); U = @(R)0.5*R*(R>=0 & R<10)+5*(R>=10 & R<=100); P = @(R)I(R)*U(R); R = 0:0.1:...

etwa ein Monat vor | 0

| akzeptiert

Beantwortet
Why eigen vector looks different than the calculated one
Eigenvectors are only unique up to a multiplicative constant, and MATLAB's eigenvectors are normalized to be of norm 1: [1;-3]/...

etwa ein Monat vor | 0

| akzeptiert

Beantwortet
Paramter optimization using fmincon
It seems that the model is not able to reproduce your measurement data. The curves look qualitatively different. clc; clear; ...

etwa ein Monat vor | 0

| akzeptiert

Beantwortet
i make a code of shooting method for 3rd order differential equation but i dont get the accurate result
y20 = 2; sol = fsolve(@fun_shooting,y20); [X,Y] = fun_ode(sol); plot(X,Y(:,1)) function res = fun_shooting(y2) [X,Y] = ...

etwa ein Monat vor | 1

| akzeptiert

Beantwortet
Non linear system by Newton-Raphson
x1 = 1; y1 = 1; P = [x1 ; y1]; F= @(x,y) [atan(y)-y.*x.^2 ; x.^2+y.^2-2*x]; JF = @(x,y) [-2.*x.*y (1/(1+y.^2))-(x.^(-2)) ;...

etwa ein Monat vor | 2

Beantwortet
need help getting this to run
Maybe initial_strain_index = find(colum1 == min(colum1),'first'); peak_stress_index = find(colum3 == max(colum3),'first'); in...

etwa ein Monat vor | 0

Beantwortet
How to visualise the 'output' of a Neumann boundary condition?
I think the example "Heat Transfer Problem on a Square" under https://uk.mathworks.com/help/pde/ug/pde.stationaryresults.eval...

etwa ein Monat vor | 1

| akzeptiert

Beantwortet
one of the terms "Rho_net" on the RHS of an set is varying with time over the tspan. How do I implement the set of the ODEs such that the term updates at every time step?
If you insert the line size(dYdt(tspans(1),initial_conditions)) before the call to ode45, you will see that your function dYdt...

etwa ein Monat vor | 0

| akzeptiert

Beantwortet
Newton Raphson gives answers divided by 0
Your linear systems in the course of the Newton iterations cannot be solved since the Jacobian is rank-deficient (it has only ra...

etwa ein Monat vor | 1

Beantwortet
I am wanting to delete these entries of vector x when x = 0. How do I do this. Matlab gives me an error right now saying index cannot exceed 38 but I don't know what's wrong.
Use x(x==0) = []; instead of for i = 1:56 if x(i) == 0 x(i) = [] end end The length of the x-vector wil...

etwa ein Monat vor | 0

Beantwortet
I am trying to create a while loop where a marker can't leave a box of x = -10 and y = 10, y = -10. Once the marker reaches x = 11 I want the loop to stop.
Put the k = k+1 at the end of the while-loop, not at the beginning. And if x(k) == -10, you only set x(k+1), but not y(k+1). Th...

etwa ein Monat vor | 0

| akzeptiert

Beantwortet
solving for y in equation
a = 85.147; h = 55; v = 50; u = 25; f = @(x,y)x-sqrt(a^2+h^2)-(h-y).*cot(asin((h-y)/v))+(h-u)*cot(pi/4-asin((h-y)/v))+v*sin(...

etwa ein Monat vor | 0

Beantwortet
Iteration loop for a function to reach a certain value.
g=9.81; NU=2.52; k=.0293;%from book L=.025;%plate to cover spacing m sigma=5.6697e-8; epsilonp=0.95;%plate emittance epsil...

etwa ein Monat vor | 0

| akzeptiert

Beantwortet
Why do I have a never ending loop ?
The initial condition at t = 0 seems to be T = 4 for all x in your code. But you must set boundary conditions for T at x = 0 an...

etwa ein Monat vor | 0

| akzeptiert

Beantwortet
Multi objective optimization for genetic algorithm showing out of bound solutions.
If you plot x(:,2) against x(:,1), you will see that both respect the bounds you prescribed: figure(2) [x1,idx] = sort(x(:,1))...

etwa ein Monat vor | 2

Beantwortet
Please help to solve the error in evaluating a system of odes using ode45
Rho_net is an array of length 365, but it must be a single scalar value in ode_2. If you want to evaluate the array at time t g...

etwa ein Monat vor | 1

| akzeptiert

Beantwortet
Solving the differential equation by the Runge-Kutta method (ode45)
[t, y] = ode45(@odefun2,[0 3],[1,0]); plot(t,y(:,1)) function dfdt = odefun2(x,y) w = 2e16; r0 = 30e-6; c = 3e8; ...

etwa ein Monat vor | 0

| akzeptiert

Beantwortet
Breaking down a numerical integration into two parts
I1 = dx/2 * f(x0) + dx * sum_{i=1}^{n-1} f(xi) + dx/2 * f(xn) I2 = dx/2 * f(xn) + dx * sum_{i=n+1}^{n+m-1} f(xi) + dx/2 * f...

etwa ein Monat vor | 1

| akzeptiert

Beantwortet
simple x.y plot
Use y = (4*(x.^2)*log(6))+(5*(x.^2)) ./ sqrt (cos(x).^2) +1 instead of y = (4*(x^2)*log(6))+(5*(x^2)) / sqrt (cos(x).^2) +1...

etwa ein Monat vor | 0

Mehr laden