Réponse apportée
I don't know why this code is saying, "Arrays have incompatible sizes for this operation."
Your vector of initial conditions is 6x1 y0 = [Pi; Si; Li; Ii; Ri; Bi]; but you only return a 5x1 vector in PSLIR dydt = [dPd...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Matlab grader discretization help
Use off_diagonal = coefficient * ones(N-1, 1); instead of off_diagonal = coefficient * ones(N-2, 1); See the example "Create...

plus de 2 ans il y a | 0

Réponse apportée
Apply fmincon nonlinear parameter inequality constraints into SimBiology for parameterization
function [c,ceq] = nonlincon(params) %Nonlinear inequality constraints c(1) = params(1)*params(2) - params(5)*params(7); % For...

plus de 2 ans il y a | 0

Réponse apportée
Trouble with For Loop
for i = 1:35 dataN_(i) = ecg_data (:,i); mean_HR_subject(i) = ... ... end

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Solving first order ODE with initial conditions and symbolic function
You solved it in your code. The second solution out of the three MATLAB returned is the "correct" one giving real-valued tempera...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
It takes too long to run the program and in the end I get an error, could you tell me what the error is?
You can't change the input for x in function "campo_pendulo". So you can delete this part of your code because it doesn't influ...

plus de 2 ans il y a | 0

Réponse apportée
Can someone help me check if I did this correctly?
Replace syms r a0 by syms r a0 positive to get the limits resolved.

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Fixed Bed Adsorption Column Using Dimensionless Equations
The usual procedure is to define a grid 0 = X(1) < X(2) < ... < X(n) = 1 approximate the spatial derivative dA/dX in grid poin...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Index exceeds the number of array elements. Index must not exceed 4.
Maybe you mean for i = 1:nt1 G1 = [(1-(1/2-beta)*w2.*t1(i).^2)/(1+(beta*w2.*t1(i).^2)),t1(i)/(1+(beta*w2.*t1(i).^2)); ...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Empty plot is showing because of my er
What x-y data are given to build the Lagrange Polynomial and in which x-data do you want to interpolate ? I assume that x-y are ...

plus de 2 ans il y a | 0

Réponse apportée
Any availiable function to find the Taylor series of multi variables function in Matlab?
https://uk.mathworks.com/matlabcentral/answers/92764-how-do-i-generate-the-taylor-series-as-a-function-of-several-variables-in-m...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
I need help displaying the eigenvalue after each iteration
A = rand(10); ATA = A'*A; x0 = rand(10,1); for iter = 1:10 y = ATA*x0; x = y/norm(y); x0 = x; y end lar...

plus de 2 ans il y a | 0

Réponse apportée
Solving 4 nonlinear equation for 4 unknowns numerical - doesn't find an answer [0×1 sym]
Try S = vpasolve(E,[x1,x2,y1,y2],[0.086 -0.176 1.0125 1.0099]) But the solution is complex-valued since your function h is com...

plus de 2 ans il y a | 0

Réponse apportée
symbolic solving system of non-linear equations
A system of 12 equations in 6 unknowns usually has no solution since it is overdetermined. Or can you extract 6 of the 12 equati...

plus de 2 ans il y a | 1

Réponse apportée
how to code a sum of function in matlab
Generate the elements that you want to sum in a matrix M of size (N,nt) where N is the index up to which you want to sum and nt ...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
square matrix containing Chebyshev polynomials becomes singular when its size becomes greater than a certain value
t0 = 0; tf = 4; N = 75; syms x h = chebyshevT(0:N, x); A = zeros(N+1,N+1); d = zeros(N+1,1); for c=1:N+1 d(c,1) = ...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
I was calculated using the Simpson 1/3 rule numerical method, why my running results doesn't appear in the command window?
Use ai=((b-a)/6)*(xa+4*(xb)+xc) %main equation instead of ai=((b-a)/6)*(xa+4*(xc)+xb) %main equation clear all; clc; %in...

plus de 2 ans il y a | 0

Réponse apportée
Laplace with Heaviside step function solving with ode45
You try to access Y(3), but you have only two differential equations for Y(1) and Y(2), I guess. And the "Y" must be "y" becaus...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How to find roots of a quartic function with unknown constant coefficients?
syms x a p = x^4 + 10.1*a*x^3 + 1.81*x^2 + 9*a*x + 0.81; sol = solve(p==0,'MaxDegree',4) vpa(subs(sol,a,1)) % E.g. for a = ...

plus de 2 ans il y a | 0

Réponse apportée
Se queda paralizado no corre todo el código y no me dice el error tampoco
Do you see why your code fails ? f=@(x)exp(sin(x))-x; f(-1) f(2) x=-1:0.01:2; plot(x,f(x)) You must start with two points ...

plus de 2 ans il y a | 0

Réponse apportée
Warning: Solutions are parameterized by the symbols: [z, z1], z1.
The "solution" you obtain with the code from above is just a repetition of your equations. Use instead clc clear V1 = 480 ; ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Generate a group of random number
Maybe you mean a Truncated Normal Distribution: https://uk.mathworks.com/help/stats/prob.normaldistribution.truncate.html

plus de 2 ans il y a | 0

Réponse apportée
How to make a 2 parameter Generalized Pareto distribution? steps required
Use https://uk.mathworks.com/help/stats/makedist.html

plus de 2 ans il y a | 0

Réponse apportée
finding the solution of a matriciel Differential Equation
Your equations cannot be solved analytically using "dsolve". Use a numerical solver instead: J=0.024; p=2; f=50; ws=2*pi*f...

plus de 2 ans il y a | 0

Réponse apportée
I try to calculate the following integral
Wolfram Alpha gives an answer in terms of the Meijer G-function: https://www.wolframalpha.com/input?i=integration&assumption=%7...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Issue in solving two Non Linear Simultaneous Equations with multivariable function to optimize.
Give z a numerical value and solve for x and y using MATLAB's "fsolve".

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Do not understand how to make my index exceed 1. (thank you)
In the first line of the for-loop, you set bstress to a scalar value. So in the statement if bstress(i) < NegEstress(i) bst...

plus de 2 ans il y a | 0

Réponse apportée
Error using vertcat Dimensions of arrays being concatenated are not consistent.
Maybe you mean something like this. I don't know whether it must read y(1) or y(2) at the place marked in bold letter in the ne...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Hello, I am making an algorithm to calculate temperature over steam but I don't know if the logic is well structured.
What your code does is solving R * T ./ (v - b) - a * alpha(T) ./ (v .* (v + b) + b .* (v - b)) = 0 for v. I don't think thi...

plus de 2 ans il y a | 0

Réponse apportée
terminate loop diverging to inf
I'm not sure, but I guess you meant something like this: NT = 1024; N = 2048; r = 0.9; omega = (sqrt(5)+1)/2; phi = 2*pi*om...

plus de 2 ans il y a | 0

| A accepté

Charger plus