Réponse apportée
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...

10 mois il y a | 0

| A accepté

Réponse apportée
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...

10 mois il y a | 1

Réponse apportée
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...

10 mois il y a | 0

Réponse apportée
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...

10 mois il y a | 0

Réponse apportée
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...

10 mois il y a | 0

Réponse apportée
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); ...

10 mois il y a | 0

Réponse apportée
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...

10 mois il y a | 0

| A accepté

Réponse apportée
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...

10 mois il y a | 0

| A accepté

Réponse apportée
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 ...

11 mois il y a | 1

| A accepté

Réponse apportée
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 ...

11 mois il y a | 0

| A accepté

Réponse apportée
May I ask everyone to help me solve this problem
I'm not sure, but if you want to integrate the normal distribution, use "mvncdf". integral2 can be very inaccurate when integrat...

11 mois il y a | 0

Réponse apportée
Clustering using Gower's Distance
To use a distance that is not implemented, you have to define a function handle. Since I guess that GowerDst is not a function h...

11 mois il y a | 0

Réponse apportée
Why do I get the wrong values for enthalpy on the P-h diagram block in Simulink/Simscape?
The reference enthalpy for R-134a is often given for the saturated liquid at -40°C, with a value of 148.4 kJ/kg. If you look at ...

11 mois il y a | 1

| A accepté

Réponse apportée
Problems plotting an implicit solution to a differential equation
For more complicated cases where an explicit solution cannot be found: syms y(x) eqn = diff(y) == (2*x+y+2)/(2*x+y-4); soluti...

11 mois il y a | 0

| A accepté

Réponse apportée
fft function seemingly not evaluating correctly
syms x f = 1/(2*sym(pi))*exp(-0.5*x^2); fourier(f) The Gaussian Pulse example under https://uk.mathworks.com/help/matlab/ref...

11 mois il y a | 0

Réponse apportée
mvncdf seems to be violating the additive property of integrals
The complete IR^2 is made up of four quarter zones, not two. Sketch the quarter zones over which you integrate to understand wha...

11 mois il y a | 1

| A accepté

Réponse apportée
how to evaluate the integral of the expression involving bessel functions.
l = 0; R_I = 2; N = 3; P = 3; k = [0.28,0.2,0.1,0.05]; %[k0,k1,k2,k3] e = [0.3,0.9,0.7]; %[e1,e2,e3] d = [0.1,0....

11 mois il y a | 0

Réponse apportée
I have 9 coupled nonlinear ordinary differential equations. and i have to convert it in to state space form. here i have 9 state variable including theta.
Write your system as M(U,U')*U'' = f(U,U') with a (9x9) matrix M. Then you can use ode15s to solve the system V' = W ...

11 mois il y a | 0

| A accepté

Réponse apportée
Solving boundary value problem
I think this is what you want. But although there are four boundary conditions for four free parameters, they do not suffice to...

11 mois il y a | 2

Réponse apportée
Wierd wiggle in plot of symbolic expression
Using IB0(t) = vpaintegral(@(tau)B(tau,0),tau,0,t,'Waypoints',[1]); instead of IB0(t) = int(B(tau,0),tau,0,t); makes the wi...

11 mois il y a | 4

| A accepté

Réponse apportée
How to Apply Multiple BC Types (Dirichlet, Robin, Neumann) on a Single 3D Face?
gd = [3 4 -0.5 0.5 0.5 -0.5 -0.5 -0.5 0.5 0.5; 3 4 0.5 1.5 1.5 0.5 -0.5 -0.5 0.5 0.5; 3 4 -1.5 -0.5 -0.5 -1.5 -0.5...

11 mois il y a | 1

| A accepté

Réponse apportée
Solving a system of a changing number of nonlinear equations
The solver doesn't converge. You should check parameters and equations. load 'AppxSteadyStateTestInput.mat' fun = @(x)test1(x,...

11 mois il y a | 0

Réponse apportée
How to Apply Multiple BC Types (Dirichlet, Robin, Neumann) on a Single 3D Face?
Here is one way to create the geometry such that you can set different boundary conditions on different faces at the top. If yo...

11 mois il y a | 0

Réponse apportée
Cap Maximum ODE solve time
Josh Meyer's answer shows you one possible way to do this: https://uk.mathworks.com/matlabcentral/answers/511547-possibility-to...

11 mois il y a | 1

Réponse apportée
Please help me to plot surface figure. I want to draw this attached photo 2 dimension of (NG,etta) in 3 dimension as (NG, R,etta)
proj() function sol= proj clc;clf;clear; global n; global s %Relation of base fluid rhof=997.1*10^-3;kf=0.613*10^5;cpf=4...

11 mois il y a | 0

| A accepté

Réponse apportée
How do I delete specific parts of a graph
The arclength of a function will always be increasing. Thus your graph cannot be the arclength of a function. clear, clc syms ...

11 mois il y a | 1

| A accepté

Réponse apportée
How can I calculate the power spectral density of a gaussian pulse?
Here is another one: https://uk.mathworks.com/matlabcentral/answers/169376-power-spectral-density-two-approaches

11 mois il y a | 1

| A accepté

Réponse apportée
Please help me. I want to run this attached simple code
Use function dy= projfun(x,y) and replace m by x in the function. Further, b5 and a are undefined. Further, you miss a multi...

11 mois il y a | 0

| A accepté

Réponse apportée
Positive Roots of bessel functions.
As I understand your question, given l, you try to find 0 < x_1 < x_2 < x_3 < ... < x_m that makes J_l(x_i) = 0 for i = 1,2,......

11 mois il y a | 0

Réponse apportée
Can we find derivative of bessel functions in matlab directly?
You can compute it symbolically first and insert the result as a numerical expression in your code. syms x diff(besselj(0,x),x...

11 mois il y a | 0

| A accepté

Charger plus