help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plotting basics


From: Mike Miller
Subject: Re: Plotting basics
Date: Fri, 21 Feb 2014 12:06:14 -0500

On Fri, Feb 21, 2014 at 08:58:38 -0800, Byron Hawkins wrote:
>> [...]
>> args = argv();
>> plots = [];
>> for i = 3:length(args),
>>  plot = dlmread(args{i});
>>  plots = [plots;plot];
>> end;
> [...]
>
> Here is the error:
>
> Loading plot #2: data/word-create.ind.v.m
> Loading plot #3: data/word-create.ind.s0.m
> Loading plot #4: data/word-create.ind.s1.m
> error: ./generate-plot.m: subscript indices must be either positive integers
> less than 2^31 or logicals
> error: called from:
> error:
> /stash/experiments/train/word/create/current-merge/chart/generate-plot.m at
> line 21, column 3

You have a variable named "plot" in your script that is overriding the
function named plot. What looks to you like a function call is
actually indexing into the plot variable. That's why the error is
reported as coming from your script and not from inside the plot
function. Try renaming the variable plot in your for loop and you
should get better results.

HTH,

-- 
mike


reply via email to

[Prev in Thread] Current Thread [Next in Thread]