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

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 0

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

casi 4 años hace | 1

| aceptada

Respondida
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...

casi 4 años hace | 0

Respondida
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 ...

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 0

Respondida
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 ...

casi 4 años hace | 0

| aceptada

Pregunta


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...

casi 4 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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...

casi 6 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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) =...

alrededor de 6 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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...

casi 7 años hace | 1 respuesta | 0

1

respuesta

Respondida
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.

más de 7 años hace | 0

Pregunta


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...

más de 7 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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...

casi 8 años hace | 2 respuestas | 0

2

respuestas