"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

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.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest