0

I'm trying to create a music piece by appending one vector to another vector. I create a row vector and trying to use sound(ct, 8000); to play the music, it throws error Cell contents reference from a non-cell array object. What should I do? This is the code:

z = sin(0*pi*(0:0.000125:1));
g = sin(2*pi*220*2^(10/12)*(0:0.000125:0.25));
f = sin(2*pi*220*2^(8/12)*(0:0.000125:0.25));
eb = sin(2*pi*220*2^(6/12)*(0:0.000125:1));
d = sin(2*pi*220*2^(5/12)*(0:0.000125:1));
ct = [z g g g eb z f f f d];
sound(ct, 8000);

What does it means?

Cell contents reference from a non-cell array object
Zhou
  • 31
  • 3
  • 2
    The code does not reproduce your issue. You have probably shadowed one or more of your variable and/or function names. Do a `clear all` and try again. – sco1 Nov 17 '16 at 21:36
  • I too was not able to reproduce your error. In the spirit of software, have you tried restarting matlab, I just joking a `clear all` should fix it as suggested by @excaza – mpaskov Nov 17 '16 at 22:19

0 Answers0