Answered
define 300 function calls x1(t)---x300(t)
You shouldn't use the way described here https://uk.mathworks.com/help/symbolic/solve-semilinear-dae-system.html to define a D...

2 months ago | 0

Answered
Solve Semilinear DAE System
I am not sure what Y is in these two lines. Y is the (numerical) vector of unknowns - in the example Y = [x,y,T,dx/dt,dy/dt]. ...

2 months ago | 0

| accepted

Answered
Getting an empty figure for ( amplitude vs rotor speed)
You get amp = NaN as result, and NaN values are not plotted.

2 months ago | 0

Answered
Calculate expm(m*A*t/n) from expm(A*t/n)
Your question is how to get expm(c*A) given A for a scalar c. Diagonalize A such that A*V = V*D. It follows that (c*A)*V = V*...

2 months ago | 0

| accepted

Answered
Gradients not recorded for a dlnetwork VAE
Did you read the documentation on how "dlgradient" is to be applied ? https://uk.mathworks.com/help/deeplearning/ref/dlarray.dl...

2 months ago | 0

| accepted

Answered
Access Denied to a folder created by the script
You create C:\Users\HP\Documents\MATLAB\Simulations\Sim_DOA_-60deg as a folder. But WriteOpenEMS(Sim_Folder, FDTD, CSX); a...

2 months ago | 1

Answered
How do I get bold formatted subscript mathematical expressions in MATLAB using LaTeX?
x = 0:10; y = x; plot(x,y) xlabel('$g_{\mathbf{\mathit{R}}}$','interpreter','latex')

2 months ago | 0

Answered
Help with Difference Equation in MATLAB
If V_i, h_i, C, K and theta_0 and theta_1 are given, you can solve for theta_(i+1) and compute theta in a loop. theta(i+1) = ((...

2 months ago | 0

| accepted

Answered
Integrations of Bessel functions
For the first integral I_1, see https://math.stackexchange.com/questions/393399/integral-of-product-of-bessel-functions-of-the-...

2 months ago | 0

| accepted

Answered
Solving linear system of equations
I think you mean %Parâmetros x=0; del=0; al1=0.707; oc=0.3; Gamma1=1; Gamma3=1; g1=1/100; %Matriz a ser diagonalizada ...

2 months ago | 0

| accepted

Answered
Calculate eigenfunctions to known eigenvalues
https://en.wikipedia.org/wiki/Inverse_iteration You could also try null(A-lambda*eye(size(A))) where lambda is a given eigenv...

2 months ago | 0

Answered
Deactivate trial toolbox and reactivate on another machine?
This is AI's answer under "Google": To use a MATLAB toolbox trial on a new computer, you'll need to deactivate the trial on th...

2 months ago | 1

Answered
TCC Connection design matrix
You can code it with V and C being sparse. For simplicity, I used full matrices. n = 50; V = zeros(n); s = zeros(n,1); V(1,1...

2 months ago | 0

Answered
Unexpected results using SVD to separate components that make up a function
Others have already explained why you cannot recover p1, p2 and p3 from an SVD of p = p1 + p2 + p3. All you can do is write p...

2 months ago | 0

Answered
How can i get to get this curve in red when the vector is moving? The curve results from the displacement of the tip of the vector
% Définir les vecteurs de la base O (i, j, k) i = [1; 0; 0]; % Vecteur i j = [0; 1; 0]; % Vecteur j k = [0; 0; 1]; % V...

2 months ago | 0

| accepted

Answered
Error plotting orbits figure
Seems that most of the missing functions are available under http://www.rotordynamics.info/ (Software for Lateral Vibrations, ...

3 months ago | 0

| accepted

Answered
Counting the number of increments in a vector
x = 0:0.1:7; numel(x(x<=3))

3 months ago | 0

| accepted

Answered
Get mean of a matrix which has NaN in it
grades = [2,4,6; 5, NaN, 1; 7, 2,NaN] mean(grades,1,"omitnan")

3 months ago | 0

Answered
Resonance in moonpool type structures
I'd change k(n) = lsqnonlin(fun_alpha, guess, x0_left, x0_right); to k(n) = lsqnonlin(fun_alpha, guess, x0_left, x0_right,op...

3 months ago | 0

| accepted

Answered
Incorrect results for subtraction despite working for other use cases.
"segments_of_free_space" and "focal_lengths" (or "f" and "gaps") must have the same number of elements because you reference gap...

3 months ago | 0

Answered
MATLAB Onramp: Help with Plots
The problem seems to be known: https://uk.mathworks.com/matlabcentral/answers/2178891-why-does-my-answer-to-a-task-show-up-as-i...

3 months ago | 0

| accepted

Answered
Help with Solving PDE System with DAE in MATLAB
You have discretized your equations in space. Thus the y variables are only functions of time for fixed z-coordinates. Here is...

3 months ago | 1

Answered
Solving DE initial value problem symbolically in Matlab
By default, y is assumed a function of t: syms x y(t) sol(t) = dsolve('x*Dy+y=-sin(x)','y(pi/2)=0') simplify(x*diff(sol,t)+so...

3 months ago | 0

Answered
How to iteratively solve when equations are dependent on each other.
Sigma_ysrtM = load("Sigma_ysrtM.mat").Sigma_ysrtM; T_oQlast = load("T_oQlast.mat").T_oQ; K_dot_nom = load("K_dot_nom.mat").K_d...

3 months ago | 0

Answered
dispersion equation in water waves
I solve in y = x*h. Thus the result has to be divided by h to get x. k(j,n) = fzero(@(y)fun_alpha(y,omega(j)),y0_alpha)/h; The...

3 months ago | 0

Answered
Difference between integral and cumtrapz.
Your input arguments to "cumtrapz" are reversed: you have to use intfx = cumtrapz(x,fx); instead of intfx = cumtrapz(fx,x); ...

3 months ago | 0

Answered
Please 🙏 help me to find the exact solution of ODE
I doubt you can get an analytical expression for y. All you can do is to transform your 2nd order ODE into a system of first-ord...

3 months ago | 0

| accepted

Answered
Storing value in a matrix from a for loop.
Don't use "size" as a variable name - it's a MATLAB - reserved function: https://uk.mathworks.com/help/matlab/ref/double.size.h...

3 months ago | 0

| accepted

Answered
How to store a matrix so that I can call upon it in any other file I am working in?
Declare the matrix as "global" or pass it as input argument to all functions where it is needed. Or save it as a .mat-file and ...

3 months ago | 1

| accepted

Answered
Gaps in contour plot using custom secant method (when solving for two-plume merger)
The equation for rho is a polynomial of degree 4. The MATLAB function "roots" solves for the four zeros of this equation. I ...

3 months ago | 0

| accepted

Load more