Answered
How to define function
function y = f(x) y = zeros(size(x)); y(abs(x) < 1) = 1; end

meer dan 3 jaar ago | 0

| accepted

Answered
Please help me understand whether I have set up a loop and performed an RMSE (Root Mean Square Error) calculation correctly
is this way more efficient? freq = 1; T = 1/freq; w = 2*pi*freq; a = [1 1/2]; % harmonic amplitudes y = @(t) a(1)*sin(w*t...

meer dan 3 jaar ago | 0

Answered
Solve a system of two differential equations
generally in order to solve a system of ode s; you must first define your equation in the form of (Xdot = f(X,U)). "U" is the i...

meer dan 3 jaar ago | 0

Answered
data import from mat file
instead of a_1 ,a_2,..., define a vector "a" where its elements a(1), a(2), ... are your input argument. your function should lo...

meer dan 3 jaar ago | 0

Answered
A simple problem about matrix plz HELP me
suppose your matrix is called "X". if you want to scale each row by a known factor, write this code: % define a column vector c...

meer dan 3 jaar ago | 0

| accepted

Answered
symbolic toolbox problem ?
by default matlab vpa uses 32 digits. old = digits(4) vpa(pi) old = 32 ans = 3.142 old = digits(9) vpa...

meer dan 3 jaar ago | 0

Answered
integration not giving a numerical answer?
vpa(I) ans = 13.475706197048467507041153147166

meer dan 3 jaar ago | 1

| accepted

Answered
Solve 2 equations with two unknowns and an array
you are using symbolic toolbox. I recommend to make a function file looking like this: function y=eq(x) % enter equations % t...

meer dan 3 jaar ago | 0

Answered
Simulink : Define signal label of output ports = outport names ?
just use "goto" and "from" blocks and then connect them to a bus creator. double click the line connecting "from" block to "bus ...

meer dan 3 jaar ago | 0

Answered
I need help solving a system of differential equations. The equations are given below, in matrix form. The problem that I'm having is regarding the fact that I have time dependant elements in the matrices.
if you are solving a circuit with time-variant capacitors then your state equations are no longer in "Xdot=A*x+B*U", and they ar...

meer dan 3 jaar ago | 0

Answered
How can I find the coefficients of a polynomial equation for fit the curve in MATLAB?
if "p" and "t" are both independant variables then your problem is in the form of "y=f(x,z)" or "v=f(p,t)". x=[ 19.4 ...

meer dan 3 jaar ago | 0

| accepted

Question


solve A*X=B containing very large or small elements
hello i have this linear system of equations A*X=B, which is apparently ill-conditioned with RCOND = 0. the elements in these m...

meer dan 3 jaar ago | 1 answer | 0

1

answer

Question


solve second order ode system numerically
hello I'm trying to solve this system of second order ordinary differential equations using ode functions (not dsolve): k1...

meer dan 5 jaar ago | 1 answer | 0

1

answer

Question


define a piecewise function whose parameters change on each segment
hello I,m trying to write a code to define this piecewise function. the function contains two sub-functions: v_on(A,B,t) =...

bijna 6 jaar ago | 1 answer | 0

1

answer

Question


writing in other languages(C,python,...)
hello Q1:is there a way to write your code in C in matlab editor just like in matlab language? Q2:is there a way to use .c...

meer dan 6 jaar ago | 1 answer | 0

1

answer

Answered
How to give a step input with special shape?
hello. I have attached a simulink file. unzip it and open it. you only have to define your transfer function.

meer dan 7 jaar ago | 0

Question


force matlab to display its symbolic calculations using indexed varaiables
hello. I'm looking for a way to make matlab display the result of its output by showing the variables with their index, while d...

meer dan 7 jaar ago | 1 answer | 0

1

answer

Question


create a number of variables in workspace and assign value to them using input command
i want to write a script that first gets the number of inputs(e.g:n=4) and then creates the respective variables(e.g:var1,var2,v...

meer dan 7 jaar ago | 2 answers | 0

2

answers