Hello, this is the first question I'm asking here, after a couple of reading either in Matlab help, or the forum.
I haven't been able to get what I'm looking for.
So, I'm working with a set x = 213 x 9
I'd like to perfrom a function for each row, therefore it should be a vector of 213 x .
After that plot the final result vs the original data.
Example of DataSet
See attached image
Function to be performed
function KU = Kurtosis( y )% % Kurtosis
T=size(y,1); KU(1)=y(1); for i=2:T y_mean=mean(y(1:i)); y_std=std(y(1:i)); KU(i)=sum(((y(1:i))-repmat(y_mean,i,1)).^4)/((T-1)*y_std.^4); endend
I've tried the following:
Using for loop
Kurtosis_test = 0;for i = 1:size(data(1:1,:)) for j = 1:size(data) Kurtosis_test = Kurtosis(data(i:j,:)) endend
Using rowfun
test = rowfun(Kurtosis,data)Not enough input arguments.Error in Kurtosis (line 3) T=size(y,1);
Thanks in advance.
Best Answer