help-octave
[Top][All Lists]
Advanced

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

Re: Re: file where sep decimals is comma


From: Sebastian Kruk
Subject: Re: Re: file where sep decimals is comma
Date: Fri, 23 Sep 2011 17:09:21 -0300

It's work!

Thks,

Sebastian.

2011/9/23  <address@hidden>:
> Send Help-octave mailing list submissions to
>       address@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://mailman.cae.wisc.edu/listinfo/help-octave
> or, via email, send a message with subject or body 'help' to
>       address@hidden
>
> You can reach the person managing the list at
>       address@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Help-octave digest..."
>
>
> Today's Topics:
>
>   1. Re: equivalent of mapminmax in octave (Jordi Guti?rrez Hermoso)
>   2. Classdef Support (Chris Spencer)
>   3. Re: equivalent of mapminmax in octave (George Kousiouris)
>   4. Re: equivalent of mapminmax in octave (Jordi Guti?rrez Hermoso)
>   5. Octave 3.4.2 Mingw Image Package (Ian Journeaux)
>   6. Re: file where sep decimals is comma (Leo Butler)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 23 Sep 2011 10:39:13 -0500
> From: Jordi Guti?rrez Hermoso <address@hidden>
> To: George Kousiouris <address@hidden>
> Cc: help-octave <address@hidden>
> Subject: Re: equivalent of mapminmax in octave
> Message-ID:
>        <address@hidden>
> Content-Type: text/plain; charset=UTF-8
>
> On 23 September 2011 10:34, George Kousiouris <address@hidden> wrote:
>> Is there a similar functionality with Matlab's mapminmax in octave?
>
> Doesn't look like it. Can you implement it for us?
>
> - Jordi G. H.
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 23 Sep 2011 11:50:13 -0400
> From: Chris Spencer <address@hidden>
> To: address@hidden
> Subject: Classdef Support
> Message-ID:
>        <address@hidden>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
>
> I'm trying to use Octave 3.2 under Ubuntu 10.04 to run some
> image-processing related Matlab code
> (http://www.cs.berkeley.edu/~lbourdev/poselets/).
>
> Specifically, I tried running "octave demo_poselets.m". It seemed to
> run well at first, until it encountered the error:
>
> Detecting poselets... parse error near line 20 of file
> /tmp/poselets/code/poselet_detection/hit_list.m
>
>  syntax error
>
>>>>     end
>      ^
>
> That line is inside a classdef statement. I researched Octave's
> support for classdef:
>
> http://wiki.octave.org/wiki.pl?MissingMatlabFunctions
> http://octave.1599824.n4.nabble.com/classdef-support-for-octave-td1651758.html
>
> and while it looks like there have been proposed solutions, and even
> code, for adding classdef support back in 2008, current Octave still
> might not support it. Is this correct? Is there any potential
> workarounds?
>
> Regards,
> Chris
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 23 Sep 2011 18:53:55 +0300
> From: George Kousiouris <address@hidden>
> To: Jordi Guti?rrez Hermoso <address@hidden>
> Cc: help-octave <address@hidden>
> Subject: Re: equivalent of mapminmax in octave
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 9/23/2011 6:39 PM, Jordi Guti?rrez Hermoso wrote:
>> On 23 September 2011 10:34, George Kousiouris<address@hidden>  wrote:
>>> Is there a similar functionality with Matlab's mapminmax in octave?
>> Doesn't look like it. Can you implement it for us?
>>
>> - Jordi G. H.
>> _______________________________________________
>> Help-octave mailing list
>> address@hidden
>> https://mailman.cae.wisc.edu/listinfo/help-octave
>>
>>
> Sure, i can give it a try
>
> BR,
> George
>
> --
>
> ---------------------------
>
> George Kousiouris
> Electrical and Computer Engineer
> Division of Communications,
> Electronics and Information Engineering
> School of Electrical and Computer Engineering
> Tel: +30 210 772 2546
> Mobile: +30 6939354121
> Fax: +30 210 772 2569
> Email: address@hidden
> Site: http://users.ntua.gr/gkousiou/
>
> National Technical University of Athens
> 9 Heroon Polytechniou str., 157 73 Zografou, Athens, Greece
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 23 Sep 2011 10:58:10 -0500
> From: Jordi Guti?rrez Hermoso <address@hidden>
> To: George Kousiouris <address@hidden>
> Cc: help-octave <address@hidden>
> Subject: Re: equivalent of mapminmax in octave
> Message-ID:
>        <address@hidden>
> Content-Type: text/plain; charset=UTF-8
>
> 2011/9/23 George Kousiouris <address@hidden>:
>> On 9/23/2011 6:39 PM, Jordi Guti?rrez Hermoso wrote:
>>>
>>> On 23 September 2011 10:34, George Kousiouris<address@hidden>
>>> ?wrote:
>>>>
>>>> Is there a similar functionality with Matlab's mapminmax in octave?
>>>
>>> Doesn't look like it. Can you implement it for us?
>>
>> Sure, i can give it a try
>
> Very glad to hear it. Make sure it's an independent implementation
> (don't read the Mathworks' source if it's available to you). Looks
> like it should go in the neural network package, which is
> Octave-Forge. Don't worry too much about performance or style for now.
> First make it work, later we can try to make it work better.
>
> Thank you very much for considering this implementation,
> - Jordi G. H.
>
>
> ------------------------------
>
> Message: 5
> Date: Fri, 23 Sep 2011 11:08:29 -0500
> From: "Ian Journeaux" <address@hidden>
> To: <address@hidden>
> Subject: Octave 3.4.2 Mingw Image Package
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset="us-ascii"
>
> I am trying out Octave 3.4.2 for Windows (mingw) and got an error when
> running my script regarding
>
>
>
> error: imread: invalid image file: could not find library or dependents:
> C:\octave342\octave\3.4.2\lib\octave\3.4.2\oct\i686-pc-mingw32\__magick_read
> __.oct
>
> error: called from: error:
> C:\octave342\octave\3.4.2\share\octave\3.4.2\m\image\imread.m at line 74,
> column 7
>
>
>
> The file _magick_read__.oct seems to be in the fodler where it should be.
>
>
>
> Any thoughts?
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: 
> <http://mailman.cae.wisc.edu/pipermail/help-octave/attachments/20110923/db6be917/attachment-0001.html>
>
> ------------------------------
>
> Message: 6
> Date: Fri, 23 Sep 2011 12:52:42 -0400
> From: Leo Butler <address@hidden>
> To: address@hidden
> Subject: Re: file where sep decimals is comma
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=utf-8
>
> Marco Atzeri <address@hidden> writes:
>
>> On 9/23/2011 3:13 PM, Sebastian Kruk wrote:
>>> Hi, I have a csv file where sep is ";" and I have "," as decimal point.
>>>
>>> How I can import directly in Octave?
>>>
>>> An example:
>>>
>>> 1953;1453,6
>>> 1954;1480,1
>>> 1955;1576,4
>>> 1956;1621,5
>> [cut]
>>> 1983;4036,7
>>> 1984;4249,6
>>>
>>> Thanks,
>>>
>>> Sebasti?n.
>>
>> sed is your friend, in two step
>>
>> sed -e "s/,/./" -e "s/;/,/" old_file > new_file
>
>
> sed 's/,/./; s/;/,/' old > new
>
> does the trick with less writing, although it does look like my cat
> danced on the keyboard.
>
> --
> Here is an octave-only solution:
>
> function X = csvread_ns(file)
>  fid=fopen(file);
>  X=[];
>  while ((line=fgetl(fid)) && !(line == -1))
>   line=strrep(line,",",".");
>   line=strrep(line,";",",");
>   x=sscanf(line,"%i,%f");
>   X=[X,x];
>  endwhile
>  fclose(fid);
> endfunction
> octave> > > > > > > > > > > octave> system("cat /tmp/octave.txt");
> 1953;1453,6
> 1954;1480,1
> 1955;1576,4
> 1956;1621,5
> 1983;4036,7
> 1984;4249,6
> octave> csvread_ns("/tmp/octave.txt")
> ans =
>
>   1953.0   1954.0   1955.0   1956.0   1983.0   1984.0
>   1453.6   1480.1   1576.4   1621.5   4036.7   4249.6
>
>
>
> ------------------------------
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
>
>
> End of Help-octave Digest, Vol 66, Issue 50
> *******************************************
>


reply via email to

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