Réponse apportée
Problem with fit Model with odd order polynomial
In the case of the polynomial of degree 5, the design matrix is rank-deficient: T = readmatrix("DistortionTab...

11 mois il y a | 0

Réponse apportée
Doubt of Linear Algebra self-paced course
Why don't you copy it from the course and use it in future ? Or use "quiver" resp. "quiver3": figure(1) quiver([0,0] ,[0,0], ...

11 mois il y a | 0

| A accepté

Réponse apportée
How to use arrayfun with built-in Matlab functions where the variable parameter is passed with 'Name', 'Value'?
x=[ 6.9100 6.1800 6.0500 5.7900 5.5000 5.2400 4.9800 4.6800 4.5100 4.6191 5.2582 5.9801 6...

11 mois il y a | 0

| A accepté

Réponse apportée
MNPBEM Error - Issue with dot product in tripolygon file
The variable "edge" does not seem to have a substructure with name "pos". E.g. s = 2; s.pos will give this error message. ...

11 mois il y a | 0

Réponse apportée
Please help me to run this code
Note that you plot y(1,:), not y(6,:). If I were you, I'd simply use "plot" to compare the three curves depending on Gr. proj(...

11 mois il y a | 0

| A accepté

Réponse apportée
Convert a decimal approximation to exact value symbolically
Here, you need the fact that y2-y1 is an odd function: syms x y y1=sin(pi*x/2); y2=x; x1=-1; x2=1; A=2*int(y2-y1,x,x1,0)

11 mois il y a | 0

| A accepté

Réponse apportée
solving system of equations
This works, but I doubt it will work in all possible cases. % Tolerance for convergence check tol = 1e-8; max_iter = 100; it...

11 mois il y a | 0

Réponse apportée
first order PDE , verification of one solution
You shouldn't waste your time here with symbolic manipulations. What is important is that solutions f(x,y) of the PDE df/dx + ...

12 mois il y a | 0

Réponse apportée
Interp1 is not working after applying unique because of rounding off
https://uk.mathworks.com/help/matlab/ref/uniquetol.html

12 mois il y a | 0

| A accepté

Réponse apportée
(Error using vertcat) Dimensions of arrays being concatenated are not consistent
x and y are of size 1x500, phix(:,a)' and phiy(:,a)' are of size 1x8. So either x and y had to be of size 1x8 or phix(:,a)' and ...

12 mois il y a | 1

Réponse apportée
Symbolic integration: error
Here is one possible implementation: syms x y r u = ((x-1+r)^2+y^2-r^2)*(y^2-r^2/(1-2*r)*x^2); du = gradient(u, [x,y]); du2 ...

12 mois il y a | 0

Réponse apportée
Change ode time step based on state
An easier way is to choose appropriate absolute and relative tolerances to reduce the error of the integration: options = odese...

12 mois il y a | 0

Réponse apportée
Odefun returns a vector of length 1, but the length of initial conditions vector is 4.
Use function ydot = noMoonGrav(t, y) instead of function [t, ydot] = noMoonGrav(t, y)

environ un an il y a | 1

| A accepté

Réponse apportée
Symbolic calculation with solve command
Use S = solve(eqns,[k1 k2 k3],'MaxDegree',4) instead of S = solve(eqns,[k1 k2 k3])

environ un an il y a | 1

| A accepté

Réponse apportée
Display data in a while loop as a table
clear, clc format longg f=@(x) x^3-5; df=@(x) 3*x^2; [n,X,Y] = newtonimproved_4_7(f,df,1,0.00001); t=table((1:n).',X',Y'); ...

environ un an il y a | 1

Réponse apportée
Constraints to a Second Order Curve Fit
x = [150, 190, 400, 330, 115, 494].'; y = [1537, 1784, 3438, 2943, 1175, 4203].'; C = [x.^2,x,ones(numel(x),1)]; d = y; lb =...

environ un an il y a | 0

Réponse apportée
How to express constants of integral
MATLAB's "int" only returns one possible antiderivative. If you want to show the free integration constants, you could use "ds...

environ un an il y a | 2

| A accepté

Réponse apportée
solve set of inequalities and plot the solution
A = [-0.0664057051742095,0.0900076050430003;... 0.147476397055133,0.160063987615969;... -0.122381054306963,0.1252339...

environ un an il y a | 0

| A accepté

Réponse apportée
Fitting exponential using derivatives
As far as I understand, your model is a differential equation dr/dt = a*1.5^(c+d)*(5-r)^c*(3-r)^d, r(0) = r0 with unknown para...

environ un an il y a | 0

Réponse apportée
Apply boundary condition (upper and lower limit) to parameters during the fitting using the function nlinfit?
If you restrict parameters by imposing upper and/or lower bounds, a statistical analysis of the results like that offered by "nl...

environ un an il y a | 0

Réponse apportée
The problem is that when I use vpa(U(x,t), 7) to get the solution with 7-digit decimal precision, MATLAB still outputs a very long and complicated expression. how do I fix it?
The documentation says xVpa = vpa(x,d) uses at least d significant digits instead of the value of digit...

environ un an il y a | 0

Réponse apportée
how to solve 2DOF linear time variant differential equations in matlab with non-diagonal mass, stiffness and damping matrixes
x0 = [0;0;0;0]; tspan = [0 13.28]; [T,X] = ode45(@fun,tspan,x0); for i = 1:numel(T) dxdt = fun(T(i),X(i,:)); q1ddot(i) ...

environ un an il y a | 1

Réponse apportée
How can I solve the problem in integral code?
Loop over the values of the sigma-vector - thus call "vpaintegral" for each sigma value separately. Or alternatively make your ...

environ un an il y a | 1

| A accepté

Réponse apportée
Warning: Error updating FunctionLine in using fplot
In R2024b, I get the warning (see above): Warning: Function behaves unexpectedly on array inputs. To improve performance, pro...

environ un an il y a | 0

Réponse apportée
find sequence in a matrix
I = [0 1 0 1 1 1 0 0 0 1 1 1 0 0 1 0 1 0]; k = 3; saved = k + find(diff(I(k:end))==-1,1) If I is a matrix, you will have to t...

environ un an il y a | 0

| A accepté

Réponse apportée
Pass Additional Arguments into Guess Function for BVP
lambda = 15; additional_parameters = 22; solinit = bvpinit(linspace(0,pi,10),@(x)mat4init(x,additional_parameters),lambda); s...

environ un an il y a | 0

| A accepté

Réponse apportée
Solve BVP with Arrays as Coefficients
If you have functions depending on x for a, b and f, you are done. If not, you can try the following: Use "interp1" to interpo...

environ un an il y a | 0

| A accepté

Réponse apportée
Why the integration can not be calculated out correctly?
That's the best you can get, I guess: V = 0.46:0.01:1; for i = 1:numel(V) v = V(i); lower_x = 9.578251022212591 - v; ...

environ un an il y a | 0

| A accepté

Réponse apportée
Not exactly the exact answer using Symbolic Math Toolbox
syms t f = sin(t); frms = sqrt(1/(2*sym(pi))*int(f^2,t,[0 2*sym(pi)])) % rms value from definition

environ un an il y a | 1

| A accepté

Réponse apportée
How to implement time dependent heat generation
I leave the rest to you: %% Create thermal model PDE thermalmodel = createpde(1); %% Create Geometry R2= [3,4,-1.5,1.5,1...

environ un an il y a | 0

| A accepté

Charger plus