how to express the below equation in matlab, consider the roll off factors are 0,0.25,0.5,0.75,1

1 vue (au cours des 30 derniers jours)

Réponses (1)

Stefan Raab
Stefan Raab le 21 Oct 2015
Depending on what you want, there are several ways to do this:
1) Set alpha to the desired value and t to an array of your timeseries. Then you can get a vector for g by simply implement the equation by: g = . . .; Probably you have to use .* for multiplications with t, then Matlab will do an element-wise multiplication.
2) Create an anonymous function with i.e.
g = @(t,alpha) sin(alpha*pi*t); % Your function here
Then you can call the function via g(t,alpha) with your desired values.
3) Write a new function file, which you can call directly. Otherwise you can also create a handle for it, similar to the anonymous function
For 2) and 3) you can also search for function handles in the Matlab doc.

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by