Question

Finding the magnitude of an expression

Supposing that x can be expressed as a function of t as follows how can its magnitude be found using Matlab? For example, is the...

ungefär 2 år ago | 1 answer | 0

Question

Using blkbuild with symbolic functions to find the transfer function of a block diagram

In the block diagram represented by the following code blocks 1 to 7 are defined as x, where x is a symbolic variable. When the ...

ungefär 2 år ago | 0 answers | 0

Question

Reduce block diagrams symbolically

Can the code below be modified to find the transfer function in terms of symbolic functions g1 to g5 instead of numeric function...

ungefär 2 år ago | 1 answer | 0

Question

Analytically finding the roots of polynomials with symbolic variables

I am trying to solve a cubic equation with symbolic variables, but Matlab is not able to find an analytical solution. syms a l...

ungefär 2 år ago | 1 answer | 0

Question

Matlab unable to find solution to cubic polynomial

The following cubic equation has three roots. syms a solve((1225*a)/2 - 6125 == ((2*a - 35)^2*(60*a + 4200))/840, a) Matlab...

ungefär 2 år ago | 1 answer | 0

Question

Error message when trying to tune a PID controller

When trying to tune a PID controller in Simulink, I am encountering the following error. Does anyone have any suggestions on how...

ungefär 2 år ago | 1 answer | 0

Question

Simulink plotting solutions to nonlinear differential equations

I am trying to plot 1+cos(x(t)) = x'(t) in Simulink. Is this the correct way to do so?

ungefär 2 år ago | 1 answer | 0

Question

Plotting a discrete impulse in Simulink

I am trying to plot a discrete impulse, but the plot is not that expected. The values of y should be 10 for x = 1, and 0 otherwi...

ungefär 2 år ago | 1 answer | 0

Question

Plotting solutions of differential equations in Simulink

The following Simulink model solves the differential equation t - 4x(t) = x''(t), and generates the plot below for x(t). But the...

ungefär 2 år ago | 1 answer | 0

Question

Solving differential equations with Simulink

Can someone explain what differential equation is being solved below? The input is a ramp input.

ungefär 2 år ago | 1 answer | 0

Question

Transfer functions in Matlab

Given the differential equation diff(c,t,1) + 2*c(t) = r(t) I want to isolate r(t)/c(t) assuming the initial conditions are 0. C...

ungefär 2 år ago | 1 answer | 0

Question

Finding the derivative of a function with respect to the derivative of a variable

I am trying to derive the expression that contains a dependent variable x with respect to the derivative of x, but although I de...

ungefär 2 år ago | 1 answer | 0

Question

Simplifying solution of a differential equation

The most simplified version of ySol(t), the solution to the differential equation below, is 1.5*sin(2t+0.7297), but the output o...

ungefär 2 år ago | 1 answer | 0

Question

Solving equations using Laplace transform

I am trying to solve an equation using the Laplace transform without having to find the Laplace transforms of the terms in the e...

ungefär 2 år ago | 2 answers | 0

Question

Simplifying output involving heaviside discontinuity functions

I wrote a program to find the discontinuity function of a beam. The output for the shear function was f = (12*heaviside(x - 5/2...

ungefär 2 år ago | 0 answers | 0

Question

Getting started with simulink tutorial cannot reproduce the results

I was watching the tutorial at https://www.mathworks.com/videos/getting-started-with-simulink-part-4-tuning-a-pid-controller-150...

ungefär 2 år ago | 0 answers | 0

Question

Simplifying output involving symbolic variables

The eigenvalue and eigenvector expressions generated by the following code are expressions that are not fully simplified. Can so...

ungefär 2 år ago | 1 answer | 0

Question

Using dsolve to solve a system of differential equations analytically

When trying to solve a system analytically using dsolve, Matlab outputs that x is an empty function handle. Can someone explain ...

mer än 2 år ago | 1 answer | 0

Question

Creating a symbolic array

When I tried to create an array consisting of expressions in terms of a symbolic variable I get the error message Unable to co...

mer än 2 år ago | 3 answers | 0

Question

Displaying symbolic function with decimal number instead of fractional coefficients

The following code outputs a symbolic function with fractional coefficients, but I want it to display the coefficients as floati...

mer än 2 år ago | 1 answer | 0

Question

Polynomial as product of two vectors

I am trying to display a polynomial as the product of two vectors. a = [1 2 3 4 ]; syms x f = [x,x^3,x,x^3]'; a.*f The...

mer än 2 år ago | 1 answer | 0

Question

Accessing elements of built in primes function

How can the a particular prime of the primes function, which returns a double, be accessed? primes(15) class(primes(15))

mer än 2 år ago | 1 answer | 0

Question

Finding all the zeroes of a discontinuous function in a particular range

I am trying to find the zeroes of the following symbolic function. syms x moment =20*heaviside(x - 8)*(x - 8) - (3*x^2*heavis...

mer än 2 år ago | 1 answer | 0

Question

Determining the roots, maxima, and minima of a discontinuous symbolic function

How can the roots of the following discontinuity function be determined? syms x f =(x^3*heaviside(x))/18 - (3*x^2*heaviside(...

mer än 2 år ago | 1 answer | 0

Question

Evaluating a symbolic heaviside function using subs at points where disconuities are located

When trying to evaluate a symbolic function, Matlab outputs 'Nan' when it encounters discontinuities. syms x f = 22*heavisid...

mer än 2 år ago | 1 answer | 0

Question

Solve a system of nonlinear equations symbolically

The following code is meant to solve a system of nonlinear equations. syms do K eq1 =(5e-5)^2 - (do)^2 == K*25*60; eq2 = (7....

mer än 2 år ago | 1 answer | 0

Question

Plotting the heaviside discontinuity function

The plot generated by the following code is not always the same and sometimes somewhat inaccurate. For example, there should be ...

mer än 2 år ago | 1 answer | 0

Question

Array indices must be positive integers or logical values error when using cell arrays

The following code is supposed to add a function of x to a function handle f whose coefficients depend on the entries of a cell ...

mer än 2 år ago | 1 answer | 0

Question

Accessing 1 by n array from a cell array

The output of the following code is the cell array poh. Is there a way to instead access the first subarray {'poh',3,4.56} throu...

mer än 2 år ago | 1 answer | 0

Question

Accessing elements of lists within lists

I have created a list which contains several lists in the following code. a = [{'poh',3,4},{'v',5}] a=[{'poh',3,4},{'v',5}] ...

mer än 2 år ago | 1 answer | 0