gnu plot error on octave

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

gnu plot error on octave

fr33c0untry
This post was updated on .
hi,
i installed octave on ubuntu 12.04 a month ago from the software center.it has been working fine until today when i tried to plot a function and an error showed up.i tried loading some .m files which involved plotting but failed because of the same error.the error i get is:
error: invalid use of script in index expression
error: called from:
error:   /usr/share/octave/3.2.4/m/strings/strsplit.m at line 49, column 13
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error:   /usr/share/octave/3.2.4/m/miscellaneous/compare_versions.m at line 112, column 7
error:   /usr/share/octave/3.2.4/m/plot/__gnuplot_has_feature__.m at line 43, column 23
error:   /usr/share/octave/3.2.4/m/plot/gnuplot_drawnow.m at line 229, column 11
error:   /usr/share/octave/3.2.4/m/plot/gnuplot_drawnow.m at line 97, column 16
i dont know what to fix as it seems that there is some error with the source code(correct me if im wrong).i tried to uninstall gnuplot from software center and then reinstall it but that didn't work either.
looking forward to a reply
thanks
Reply | Threaded
Open this post in threaded view
|

Re: gnu plot error on octave

bpabbott
Administrator
On Jan 6, 2013, at 12:35 PM, fr33c0untry wrote:

> hi,
> i have octave installed on ubuntu 12.04.i installed octave a month ago from
> the software center a month ago.it has been working fine until today when i
> tried to plot a function and an error showed up.i tried loading some .m
> files which involved plotting but failed because of the same error.the error
> i get is:
>
> i dont know what to fix as it seems that there is some error with the source
> code(correct me if im wrong).i tried to uninstall gnuplot from software
> center and then reinstall it but that didn't work either.
> looking forward to a reply
> thanks

The error message didn't show up in the email.  It is on nabble.

error: invalid use of script in index expression
error: called from:
error:   /usr/share/octave/3.2.4/m/strings/strsplit.m at line 49, column 13
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error:   /usr/share/octave/3.2.4/m/miscellaneous/compare_versions.m at line 112, column 7
error:   /usr/share/octave/3.2.4/m/plot/__gnuplot_has_feature__.m at line 43, column 23
error:   /usr/share/octave/3.2.4/m/plot/gnuplot_drawnow.m at line 229, column 11
error:   /usr/share/octave/3.2.4/m/plot/gnuplot_drawnow.m at line 97, column 16

Your version of Octave is rather old.  It is likely this has already been fixed.  If you can provide a simple script that we can use to reproduce the error we can check.

Ben
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: gnu plot error on octave

fr33c0untry
hi ben
sorry for the late reply.gnu plot is working now .
but the error continues to show up whenever gnu plot crashes ie when i execute certain .m files or use zoom in excessively.however i found out that deleting octave core file and restarting octave would solve the problem.
i dont have problems with plotting a function but there's one .m file which i recently coded which shows this error.
i get the same error for other plots which worked previously after executing this one
here it is:
E=input('enter emf');
f=50;
xl=40*j;
xc=-40*j;
r=30;
z=xl+(r^-1+xc^-1)^-1;
zt=(r^-1+xc^-1)^-1;
e=[E -E*cos(pi/3)+E*sin(pi/3)*j -E*cos(pi/3)-E*sin(pi/3)*j];
i=e/z;
phi=arg(i(1));
I=abs(i(1));
vt=i*zt;
vl=e-vt;
ic=vt./xc;
ir=vt./r;
pc=vt.*conj(ic)
pl=vl.*conj(i)
pr=vt.*conj(ir)
t=linspace(0,2/f,190);
e_t1=E*sin(2*pi*f*t);
i_t1=I*sin(2*pi*t*f+phi);
e_t2=E*sin(2*pi*f*t+2*pi/3);
i_t2=I*sin(2*pi*t*f+phi+2*pi/3);
e_t3=E*sin(2*pi*f*t-2*pi/3);
i_t3=I*sin(2*pi*t*f+phi-2*pi/3);
p_t1=2*e_t1.*conj(i_t1);
p_t2=2*e_t2.*conj(i_t2);
p_t3=2*e_t3.*conj(i_t3);
plot(t,e_t1,t,i_t1,t,p_t1);    %plots e_t emf i_t current and p_t power as a function of time
pause(3);
plot(t,e_t2,t,i_t2,t,p_t2);
pause(3);
plot(t,e_t3,t,i_t3,t,p_t3);
pause(3);
p1=mean(p_t1)
p2=mean(p_t2)
p3=mean(p_t3)
p_total=p_t1+p_t2+p_t3;
plot(t,p_total)
the version i use is 3.2.4 which i downloaded from the software center.
Reply | Threaded
Open this post in threaded view
|

Re: gnu plot error on octave

bpabbott
Administrator
In reply to this post by fr33c0untry

On Jan 18, 2013, at 9:29 AM, Christopher Dsouza wrote:

>
> --- On Sun, 13/1/13, Ben Abbott <[hidden email]> wrote:
>
> From: Ben Abbott <[hidden email]>
> Subject: Re: gnu plot error on octave
> To: "fr33c0untry" <[hidden email]>
> Cc: [hidden email]
> Date: Sunday, 13 January, 2013, 3:14 PM
>
> On Jan 13, 2013, at 1:40 AM, fr33c0untry wrote:
>
> > hi ben
> > sorry for the late reply.gnu plot is working now .
> > but the error continues to show up whenever gnu plot crashes ie when i
> > execute certain .m files or use zoom in excessively.however i found out that
> > deleting octave core file and restarting octave would solve the problem.
> > i dont have problems with plotting a function but there's one .m file which
> > i recently coded which shows this error.
> > i get the same error for other plots which worked previously after executing
> > this one
> > here it is:
> >
> > the version i use is 3.2.4 which i downloaded from the software center.
>
> I'm running Ubuntu 12.10 via Virtual Box, the Octave available from the Software Center is Octave 3.6.2.
>
> Are you sure your Octave is 3.2.4 (is much older than Ubuntu 12)?  Have you tried to update your Octave?  What of Ubuntu and then Octave?
>
> Ben
>  
> thanks Ben
> i found octave 3.6.2 in the software center guess i did'nt notice it when i installed octave 3.2.4.
> A few days back i downloaded the tarball for octave 3.6.3 from octave forge .i tried to compile it but it shows an error that LAPACK and BLAS libraries are not found although i downloaded liblapack-dev and libblas-dev from synaptic package manager.
> it was the first time a tried to compile a software from its source.but i found it quite time consuming and had to download extra stuff from synaptic manager.is it really worth it to compile applications from source?
>
> anyways i think I'll avoid that headache and install it from the software center.

Try the line below from a terminal.  This will install all of Octave's dependencies.

        apt-get build-deb octave3.6

After that you should be able to compile the developer's sources by ...

        ./bootstrap
        ./configure
        make

If you're building from a released tar-ball, then just ...

        ./configure
        make

Ben

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: gnu plot error on octave

Jordi Gutiérrez Hermoso-2
On 18 January 2013 09:51, Ben Abbott <[hidden email]> wrote:
> Try the line below from a terminal.  This will install all of Octave's dependencies.
>
>         apt-get build-deb octave3.6

build-de*P* not build-de*B*. Get the build time dePendencies. ;-)

- Jordi G. H.
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: gnu plot error on octave

Jordi Gutiérrez Hermoso-2
In reply to this post by fr33c0untry
On 13 January 2013 01:40, fr33c0untry <[hidden email]> wrote:
> the version i use is 3.2.4 which i downloaded from the software center.

You may wish to use this PPA to get a newer Octave version:

    https://launchpad.net/~octave/+archive/stable

- Jordi G. H.
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: gnu plot error on octave

fr33c0untry
hi
i downloaded octave 3.6.3 from the software center.but i noticed that whenever i try a 3d plot or use the eig() command the terminal closes by itself.is it because the libraries are not installed properly?this never happened when i had octave 3.2.4
Reply | Threaded
Open this post in threaded view
|

Re: gnu plot error on octave

bpabbott
Administrator
On Jan 19, 2013, at 1:58 AM, fr33c0untry wrote:

> hi
> i downloaded octave 3.6.3 from the software center.but i noticed that
> whenever i try a 3d plot or use the eig() command the terminal closes by
> itself.is it because the libraries are not installed properly?this never
> happened when i had octave 3.2.4

I don't see Octave 3.6.3 in the Software Center for Ubuntu 12.10.  I do see Octave 3.6.2.  I have no problem with 3D plots or eig().

Maybe your problems has to do with the BLAS you are using? Are you using the "Optimized BLAS" based on GoToBLAS2?  You can check from [Software Center] -> [Developer Tools] -> [GNU Octave] -> [More Info]

I'm *not* using Optimized BLAS.

Ben
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: gnu plot error on octave

fr33c0untry
it's there in ubuntu 12.04 desktop version  'octave 3.6.3-2~ppa1~precise3' .i couldnt find optimized blas. i downloaded lapack-3.4.2.tgz which is the latest version from  http://www.netlib.org/lapack/ but have no clue how to install it.
i get this error when i try 3d plots:
octave: symbol lookup error: /usr/lib/liblapack.so.3gf: undefined symbol: ATL_idamax
Reply | Threaded
Open this post in threaded view
|

Re: gnu plot error on octave

fr33c0untry
In reply to this post by Jordi Gutiérrez Hermoso-2
i tried  'apt-get build-deb octave' and it installed about 53mb worth of packages/libraries but made no difference.

Reply | Threaded
Open this post in threaded view
|

Re: gnu plot error on octave

Mike Miller
In reply to this post by fr33c0untry
On Sat, Jan 19, 2013 at 8:48 AM, fr33c0untry wrote:
> it's there in ubuntu 12.04 desktop version  'octave 3.6.3-2~ppa1~precise3' .i
> couldnt find optimized blas. i downloaded lapack-3.4.2.tgz which is the
> latest version from  http://www.netlib.org/lapack/ but have no clue how to
> install it.
> i get this error when i try 3d plots:
>
> octave: symbol lookup error: /usr/lib/liblapack.so.3gf: undefined symbol: ATL_idamax

This looks like an ATLAS configuration problem. I've seen similar
errors but I can't reproduce this particular one.

First try this, in a terminal:

    sudo update-alternatives --auto liblapack.so.3gf
    sudo update-alternatives --auto libblas.so.3gf

And see if Octave works now. If not, you can completely remove ATLAS
to use Octave with the standard reference BLAS and LAPACK libraries.
Either search for libatlas3gf-base in the software center or

    sudo apt-get purge libatlas3gf-base

And see if that resolves it.

HTH

--
mike
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: gnu plot error on octave

fr33c0untry
great thanks mike its working now.no problems at all with 3d plots or matrix functions.i guess the atlas libraries was the culprit after all.those first 2 sudo commands which you suggested didn't do anything although removing atlas worked.
thanks ben and jordi for your help as well .would have given-up on cotave otherwise