"Conversion to cell from double is not possible"

I am trying to find features of EEG signals using TQWT. For finding the features of many columns I tried following code, yet I am getting the error:

Conversion to cell from double is not possible.

The code is:

for k = 1:9 filename = sprintf('F00%d.txt',k); a(:,k) = load(filename); temp = a(:,k); x = temp(2:length(a(:,k))); w = tqwt(x,1,3,3); [a1,a2,a3,a4] = deal(w{:}); a = {a1, a2, a3, a4}; for j = 1:4 H(k,j) = KraskovEntropyV2((a{j})', 2, 'euclidean'); j=j+1; end
end

What can I do about this error?

2

1 Answer

It seems that you have a cell in a{j} (a cell within a cell). you need to refer to the cell within. Presuming you only have one cell inside a{j} you can try:

H(k,j) = KraskovEntropyV2((a{j}{1})', 2, 'euclidean');

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like