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: Why am I getting this error?
Replies: 3   Last Post: Sep 26, 2013 1:54 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Derek Goring

Posts: 3,892
Registered: 12/7/04
Re: Why am I getting this error?
Posted: Sep 25, 2013 9:53 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Thursday, September 26, 2013 11:20:04 AM UTC+12, Alex wrote:
> This code used to work, now I am getting an error and I dont know why. I've posted my code, and then the error. Thanks in advance!
>
>
>
>
>
>
>
>
>
> for a = 1:18
>
> a
>
> Fileone = 'TCHSinBTBTB_Delta';
>
> File = [Fileone,'_Blink',int2str(a)]
>
>
>
> numBlinkEvents=[];
>
> compiledBlinks=[];
>
>
>
> load([Fileone,int2str(a),'.mat']);
>
>
>
> data = deltaT;
>
> stem = 'chart';
>
>
>
> for L = length(fieldnames(deltaT))
>
> field = [stem,int2str(L)];
>
> deltaT = data.(field);
>
>
>
> numBlinkEvents = [numBlinkEvents length(deltaT)];
>
> compiledBlinks = [compiledBlinks deltaT'];
>
>
>
> end
>
>
>
> vars = {'numBlinkEvents', 'compiledBlinks', L}; % Singleing out the variables to keep.
>
> save(File, vars{:});
>
> end
>
>
>
> clear all
>
>
>
> ===================================================
>
> a =
>
>
>
> 1
>
>
>
>
>
> File =
>
>
>
> TCHSinBTBTB_Delta_Blink1
>
>
>
> Error using save
>
> Argument must contain a string.
>
>
>
> Error in procdelt (line 40)
>
> save(File, vars{:});


Try 'L' instead of L in vars.



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.