Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Matlab code error
Replies: 2   Last Post: Jul 17, 2014 12:24 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Deborshi Ghosh

Posts: 3
Registered: 7/12/14
Matlab code error
Posted: Jul 12, 2014 10:46 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

cc=1;
ccc=1;
for k=1:1:length(x)
if x(k)>=0
x(k)=x_1(cc);
cc=cc+1;
elseif x(k)<0
x(k)=x_2(ccc);
ccc=ccc+1;
end
end
x has a combination of positive and negative values like 0.32, -0.67 etc.
Now where is an error in the output. Its-
Undefined function 'x_2' for input arguments of type 'double'.

Error in Audio (line 43)
x(k)=x_2(ccc);



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.