Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Trying to Run Sample Code from Matlab Site

Subject: Trying to Run Sample Code from Matlab Site

From: Ryan

Date: 25 Jun, 2014 02:26:09

Message: 1 of 5

I downloaded the sample code from here (Download Submission button):
http://www.mathworks.com/matlabcentral/fileexchange/41540-pairs-trading-strategy

I downloaded 10 years of closing prices for 'EWA'; saved it in a CSV in this directory:
'C:\StockData'

In the PairsTradingStrategy.m file I put a breakpoint here, on the if statement:
if(~strcmp(sys.BarData.Symbol,PrimarySymbol))
    return;
end

Now, I'm getting the following error:
>> PairsTradingStrategy
8 if(~strcmp(sys.BarData.Symbol,PrimarySymbol))
Error using PairsTradingStrategy (line 8)
Not enough input arguments.

What an I doing wrong here?

Thanks everyone!!

Subject: Trying to Run Sample Code from Matlab Site

From: Steven Lord

Date: 25 Jun, 2014 14:15:55

Message: 2 of 5


"Ryan " <ryanshuell@gmail.com> wrote in message
news:lodc01$rgj$1@newscl01ah.mathworks.com...
> I downloaded the sample code from here (Download Submission button):
> http://www.mathworks.com/matlabcentral/fileexchange/41540-pairs-trading-strategy
>
> I downloaded 10 years of closing prices for 'EWA'; saved it in a CSV in
> this directory:
> 'C:\StockData'
>
> In the PairsTradingStrategy.m file I put a breakpoint here, on the if
> statement:
> if(~strcmp(sys.BarData.Symbol,PrimarySymbol))
> return;
> end
>
> Now, I'm getting the following error:
>>> PairsTradingStrategy

You didn't pass anything into the function, but the function declaration on
the first line indicates it requires exactly one input argument.

*snip*

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Trying to Run Sample Code from Matlab Site

From: Ryan

Date: 26 Jun, 2014 00:14:12

Message: 3 of 5

"Steven Lord" <Steven_Lord@mathworks.com> wrote in message <loeljb$57c$1@newscl01ah.mathworks.com>...
>
> "Ryan " <ryanshuell@gmail.com> wrote in message
> news:lodc01$rgj$1@newscl01ah.mathworks.com...
> > I downloaded the sample code from here (Download Submission button):
> > http://www.mathworks.com/matlabcentral/fileexchange/41540-pairs-trading-strategy
> >
> > I downloaded 10 years of closing prices for 'EWA'; saved it in a CSV in
> > this directory:
> > 'C:\StockData'
> >
> > In the PairsTradingStrategy.m file I put a breakpoint here, on the if
> > statement:
> > if(~strcmp(sys.BarData.Symbol,PrimarySymbol))
> > return;
> > end
> >
> > Now, I'm getting the following error:
> >>> PairsTradingStrategy
>
> You didn't pass anything into the function, but the function declaration on
> the first line indicates it requires exactly one input argument.
>
> *snip*
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com


Thanks. What do I need to do to make it work? What is the parameter?

Subject: Trying to Run Sample Code from Matlab Site

From: Steven Lord

Date: 26 Jun, 2014 03:24:19

Message: 4 of 5


"Ryan " <ryanshuell@gmail.com> wrote in message
news:lofokk$7tu$1@newscl01ah.mathworks.com...
> "Steven Lord" <Steven_Lord@mathworks.com> wrote in message
> <loeljb$57c$1@newscl01ah.mathworks.com>...

*snip*

> Thanks. What do I need to do to make it work? What is the parameter?

I have no idea. There's no help describing the input, so you'll need to ask
the author of that file.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Trying to Run Sample Code from Matlab Site

From: Ryan

Date: 27 Jun, 2014 02:29:09

Message: 5 of 5

"Steven Lord" <Steven_Lord@mathworks.com> wrote in message <log3pj$2no$1@newscl01ah.mathworks.com>...
>
> "Ryan " <ryanshuell@gmail.com> wrote in message
> news:lofokk$7tu$1@newscl01ah.mathworks.com...
> > "Steven Lord" <Steven_Lord@mathworks.com> wrote in message
> > <loeljb$57c$1@newscl01ah.mathworks.com>...
>
> *snip*
>
> > Thanks. What do I need to do to make it work? What is the parameter?
>
> I have no idea. There's no help describing the input, so you'll need to ask
> the author of that file.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com


Ok, thanks. I'll try that, and I'll keep poking around, and trying a few ideas, in the meantime.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us