回答済み
How do I print the solution equation from an ode solver
@Alex Monserrat Use the text() function: tspan = [0 5]; y0 = 0; [t, y] = ode45(@(t,y) 2*t, tspan, y0); % disp([t, y]); plo...

4年以上 前 | 1

| 採用済み

回答済み
How to get area under the fit attained by Curve Fitting tool?
Hi @Anik Mukhopadhyay You can check if this works: t = linspace(0, 270, 10); T = [30 32 34.5 38.6 40 42 42.5 42.5 42 41.5]; ...

4年以上 前 | 0

回答済み
Finding the value of the below curve
Hi @Amy Topaz Since the curves are arctangent functions, the max values can be found at the boundary, in this case, that is a11...

4年以上 前 | 0

回答済み
how to solve Energy balance equation
@kashif kamal You can use this sample and assign known values to the parameters in the Energy balance equation. % Constants V...

4年以上 前 | 1

| 採用済み

回答済み
does anyone has the Matlab code for photovoltaic maximum power point tracking using simulated annealing algorithm?
Hi @Shema If you are looking for the Maximum Power Point Tracking model, then you can find many sample MPPT models in FileExcha...

4年以上 前 | 1

| 採用済み

回答済み
Rearrange an equation to solve for a different variable
@Brian Kirkland If the explicit solution cannot be found, then it is probably a transcendental equation, just like this one: ....

4年以上 前 | 0

回答済み
Hi, I have a problem understanding the use of odetovectorfield for converting syms variables into a vector for ODE45 input.
Hi @liouville In order to use odeToVectorField() effectively, the highest-order derivatives must appear linearly, and in your s...

4年以上 前 | 1

| 採用済み

回答済み
Getting a solution for two coupled nonlinear differential equations
@sardar peysin Please check if this works out for your study: A = 1.0; B = 1.0; fun = @(t, x)[-A*x(1)*x(2)^4; % 1st OD...

4年以上 前 | 4

| 採用済み

回答済み
How to solve an equation which includes iteration/summation and with a mixed unknown variable ?
Hi @IQRA KIRAN Not exactly sure how your summation look like. Maybe the LaTeX code is incorrectly entered. Anyhow, if you look...

4年以上 前 | 1

回答済み
Secant method numerical analysis
Hi @Andrew242 This is just a sample code using the Secant Method to find the root of the Kepler’s equation: function Demo_Se...

4年以上 前 | 0

回答済み
find the coefficients a, b, and c of the quadratic polynomial. that passes through the three points (x, y)
Hi @Sabrina Lozano This problem can be rather easily solved with Curve-Fitting Toolbox with a click of a button or one simple ...

4年以上 前 | 0

回答済み
How To Plot Directional Field of 2nd Order Differential Equation IVP
@Jordan Stanley Basically, it should look something like this: [X, Y] = meshgrid(-3:6/14:3, -3:6/14:3); U = Y; %...

4年以上 前 | 3

| 採用済み

回答済み
How to create a Matlab object that simulates a spring-mass system without Simulink
@Mahmoud Elzouka If the spring-mass system is non-stiff, and you want to solve for only one step time, then the conventional Ru...

4年以上 前 | 1

| 採用済み

回答済み
Minimize a function using gradient descent
@Shikhar Singh Let us visualize and formulate the minimization problem first. So you want to start descending from the point , ...

4年以上 前 | 1

回答済み
Hello everyone, i have this question which connot solve it ,ot
@Alaa Ahmed Q2 should be super easy because the Switch is OPEN. From Ohm's Law: The program should look like this: V = 5; ...

4年以上 前 | 0

回答済み
Tf Function keeps running
@Alessandro Romeo I'm glad that the proposed solution works. Just keep in mind that you don't have to clear all every time. You...

4年以上 前 | 1

| 採用済み

回答済み
Characteristic equation of a transfer function
@Oluwademilade Mustapha Check this code if this is what you want. This is the non-symbolic approach. It is better if you can pr...

4年以上 前 | 2

| 採用済み

回答済み
Plot the function combining an exponential function and a step function
Hi @Nick Please check the piecewise function if it is what you desire. Then, check the equation and the plot. subplot(2, 1, ...

4年以上 前 | 1

回答済み
Error in solving using Ode45 initial condition are y(1) = 0, y(2) =0 and y(3) =0.
Hi @Ahmed Adisa You've got the NaN because there is a division-by-zero in Eqn. (1) at the beginning when you set . The closest ...

4年以上 前 | 0

回答済み
i need this ex code to solve it in MATLAB (matlab code need help to solve it)
@Raghad Farajallah Just a simple example for page 1: V = (-10 + 10i)/(21 + 2i); I = 1; Z = V/I phasorZ = [abs(Z) angle(Z)]...

4年以上 前 | 0

回答済み
How does state space form include input delay in MATLAB?
@Sol Elec If you look at the matrices for the desired state-space system A = 1 2 3 4 3 2 1 2 3 B ...

4年以上 前 | 1

| 採用済み

回答済み
Script run takes too much time
Hi @Azime Beyza Ari Generally, there should be at least three termination conditions (stopping criteria): Stop when maximum nu...

4年以上 前 | 0

回答済み
How to write this Matrix form in Matlab?
Hi @mans maqen I show an example for first matrix: H = [1.00 0.82 0.91; 0.08 0.87 0.18; 0.44 0.08 0.26] You can complete the...

4年以上 前 | 0

回答済み
Simulink - PID Controller Tuning - Strange graphs
This is strange. I only set the max step size = 1e-3 in the solver config paramaters to produce a smoother output signal. The ...

4年以上 前 | 1

回答済み
Simulink - PID Controller Tuning - Strange graphs
Hi @Milan Hrstka The spikes in the your original output signal was caused by the derivative filter in the PID controller block....

4年以上 前 | 1

| 採用済み

回答済み
State space feedback simulink error
@Maaz Madha Please check the Gain Block on the feedback loop. Most likely you performed the multiplication incorrectly.

4年以上 前 | 1

| 採用済み

回答済み
Hi, I have a Matrix of 48 rows and 366 columns. Its a half hourly data actually so (24*2 = 48). Now I need to remove every 2nd row to make it a 24 row Matrix. How to do this?
@Mobashsher Hossain Md Mubin Perhaps, something like this: a = rand(48, 2) a([1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 3...

4年以上 前 | 1

| 採用済み

回答済み
how to write this code ?
@ahmed nasser Looks like the Kirchhoff's voltage law. https://en.wikipedia.org/wiki/Kirchhoff%27s_circuit_laws Are you lookin...

4年以上 前 | 0

回答済み
Finding gradient of a part of a graph
@Yen Tien Yap Technically, if is plotted by a function f(x) with a uniform step size h, then you can use the nabla = gradient(...

4年以上 前 | 1

| 採用済み

回答済み
Given the below differential equation representing a continuous-time system, where 𝑦(𝑡) and 𝑥(𝑡) are the system output and input respectively
Hi @bugrahan ilgaz For Q1, I think you can use tf() to build the continuous-time system transfer function and then find its zer...

4年以上 前 | 1

| 採用済み

さらに読み込む