how to express the below equation in matlab, consider the roll off factors are 0,0.25,0.5,0.75,1
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/150654/image.png)
0 Kommentare
Antworten (1)
Stefan Raab
am 21 Okt. 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.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!