|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
matrix mathHi
Is there a way to do linear algebra in sc, specifically matrix multiplication (matrix with matrix, matrix with vector,etc) ? thanks Miguel Negrão _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: matrix mathIn the MathLib Quark there's a Matrix class that I haven't used but
might be worth looking into. ~luke On Mon, May 12, 2008 at 7:26 AM, Miguel Negrao <miguel.negrao@...> wrote: > Hi > > Is there a way to do linear algebra in sc, specifically matrix > multiplication (matrix with matrix, matrix with vector,etc) ? > > thanks > Miguel Negrão > _______________________________________________ > sc-users mailing list > sc-users@... > http://lists.create.ucsb.edu/mailman/listinfo/sc-users > sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: matrix mathYes, I haven't used that class either but you may find it useful.
In fact matrix multiplication can be written fairly compactly in plain SC: a = [[1, 0, 2], [-1, 3, 1]]; b = [[3,1], [2,1], [1,0]]; a.collect{|row| (row * b).sum } Dan 2008/5/12 Luke Selden <lselden@...>: > In the MathLib Quark there's a Matrix class that I haven't used but > might be worth looking into. > > ~luke > > > > On Mon, May 12, 2008 at 7:26 AM, Miguel Negrao > <miguel.negrao@...> wrote: > > Hi > > > > Is there a way to do linear algebra in sc, specifically matrix > > multiplication (matrix with matrix, matrix with vector,etc) ? > > > > thanks > > Miguel Negrão > > _______________________________________________ > > sc-users mailing list > > sc-users@... > > http://lists.create.ucsb.edu/mailman/listinfo/sc-users > > > _______________________________________________ > sc-users mailing list > sc-users@... > http://lists.create.ucsb.edu/mailman/listinfo/sc-users > -- http://www.mcld.co.uk _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: matrix mathThanks, that's simpler than the code i was working on. Maybe something
like this could be added to Array ? //this assumes array elements are rows of a matrix + Array { mult { |matrix| if( this.flop.size == matrix.size) { ^ this.collect{|row| (row * matrix).sum } } { "Error: matrix dimensions mismatch".postln; ^nil } } } Miguel Dan Stowell escreveu: > Yes, I haven't used that class either but you may find it useful. > > In fact matrix multiplication can be written fairly compactly in plain SC: > > a = [[1, 0, 2], [-1, 3, 1]]; > b = [[3,1], [2,1], [1,0]]; > > a.collect{|row| (row * b).sum } > > Dan > > 2008/5/12 Luke Selden <lselden@...>: >> In the MathLib Quark there's a Matrix class that I haven't used but >> might be worth looking into. >> >> ~luke >> >> >> >> On Mon, May 12, 2008 at 7:26 AM, Miguel Negrao >> <miguel.negrao@...> wrote: >> > Hi >> > >> > Is there a way to do linear algebra in sc, specifically matrix >> > multiplication (matrix with matrix, matrix with vector,etc) ? >> > >> > thanks >> > Miguel Negrão >> > _______________________________________________ >> > sc-users mailing list >> > sc-users@... >> > http://lists.create.ucsb.edu/mailman/listinfo/sc-users >> > >> _______________________________________________ >> sc-users mailing list >> sc-users@... >> http://lists.create.ucsb.edu/mailman/listinfo/sc-users >> > > > _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: matrix mathMy personal opinion (just 2p worth) is that it's not appropriate for
the core Array class since it's only applicable to a particular sort of array. The Matrix class add-on does include matrix multiplication etc, makes more sense there. By the way, instead of "if( this.flop.size == matrix.size)" use "if( this[0].size == matrix.size)". Why? Because .flop is pretty heavy duty for big matrices, so worth avoiding... Dan 2008/5/12 Miguel Negrao <miguel.negrao@...>: > Thanks, that's simpler than the code i was working on. Maybe something > like this could be added to Array ? > > //this assumes array elements are rows of a matrix > + Array { > > mult { |matrix| > > if( this.flop.size == matrix.size) > { ^ this.collect{|row| (row * matrix).sum } } > { "Error: matrix dimensions mismatch".postln; > ^nil > } > > } > } > > Miguel > > Dan Stowell escreveu: > > > > Yes, I haven't used that class either but you may find it useful. > > > > In fact matrix multiplication can be written fairly compactly in plain SC: > > > > a = [[1, 0, 2], [-1, 3, 1]]; > > b = [[3,1], [2,1], [1,0]]; > > > > a.collect{|row| (row * b).sum } > > > > Dan > > > > 2008/5/12 Luke Selden <lselden@...>: > >> In the MathLib Quark there's a Matrix class that I haven't used but > >> might be worth looking into. > >> > >> ~luke > >> > >> > >> > >> On Mon, May 12, 2008 at 7:26 AM, Miguel Negrao > >> <miguel.negrao@...> wrote: > >> > Hi > >> > > >> > Is there a way to do linear algebra in sc, specifically matrix > >> > multiplication (matrix with matrix, matrix with vector,etc) ? > >> > > >> > thanks > >> > Miguel Negrão > >> > _______________________________________________ > >> > sc-users mailing list > >> > sc-users@... > >> > http://lists.create.ucsb.edu/mailman/listinfo/sc-users > >> > > >> _______________________________________________ > >> sc-users mailing list > >> sc-users@... > >> http://lists.create.ucsb.edu/mailman/listinfo/sc-users > >> > > > > > > > > _______________________________________________ > sc-users mailing list > sc-users@... > http://lists.create.ucsb.edu/mailman/listinfo/sc-users > -- http://www.mcld.co.uk _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: matrix mathDan Stowell escreveu:
> My personal opinion (just 2p worth) is that it's not appropriate for > the core Array class since it's only applicable to a particular sort > of array. The Matrix class add-on does include matrix multiplication > etc, makes more sense there. Is there a Matrix class ? I didn't find it... or are you suggesting one should be made ? That would definetelly be usefull. > > By the way, instead of "if( this.flop.size == matrix.size)" use "if( > this[0].size == matrix.size)". Why? Because .flop is pretty heavy duty > for big matrices, so worth avoiding... > > Dan always learning ;-) Miguel > > 2008/5/12 Miguel Negrao <miguel.negrao@...>: >> Thanks, that's simpler than the code i was working on. Maybe something >> like this could be added to Array ? >> >> //this assumes array elements are rows of a matrix >> + Array { >> >> mult { |matrix| >> >> if( this.flop.size == matrix.size) >> { ^ this.collect{|row| (row * matrix).sum } } >> { "Error: matrix dimensions mismatch".postln; >> ^nil >> } >> >> } >> } >> >> Miguel >> >> Dan Stowell escreveu: >> >> >>> Yes, I haven't used that class either but you may find it useful. >> > >> > In fact matrix multiplication can be written fairly compactly in plain SC: >> > >> > a = [[1, 0, 2], [-1, 3, 1]]; >> > b = [[3,1], [2,1], [1,0]]; >> > >> > a.collect{|row| (row * b).sum } >> > >> > Dan >> > >> > 2008/5/12 Luke Selden <lselden@...>: >> >> In the MathLib Quark there's a Matrix class that I haven't used but >> >> might be worth looking into. >> >> >> >> ~luke >> >> >> >> >> >> >> >> On Mon, May 12, 2008 at 7:26 AM, Miguel Negrao >> >> <miguel.negrao@...> wrote: >> >> > Hi >> >> > >> >> > Is there a way to do linear algebra in sc, specifically matrix >> >> > multiplication (matrix with matrix, matrix with vector,etc) ? >> >> > >> >> > thanks >> >> > Miguel Negrão >> >> > _______________________________________________ >> >> > sc-users mailing list >> >> > sc-users@... >> >> > http://lists.create.ucsb.edu/mailman/listinfo/sc-users >> >> > >> >> _______________________________________________ >> >> sc-users mailing list >> >> sc-users@... >> >> http://lists.create.ucsb.edu/mailman/listinfo/sc-users >> >> >> > >> > >> > >> >> _______________________________________________ >> sc-users mailing list >> sc-users@... >> http://lists.create.ucsb.edu/mailman/listinfo/sc-users >> > > > _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: matrix math2008/5/12 Miguel Negrao <miguel.negrao@...>:
> Dan Stowell escreveu: > > > My personal opinion (just 2p worth) is that it's not appropriate for > > the core Array class since it's only applicable to a particular sort > > of array. The Matrix class add-on does include matrix multiplication > > etc, makes more sense there. > > Is there a Matrix class ? I didn't find it... or are you suggesting one > should be made ? That would definetelly be usefull. As Luke said, the MathLib quark provides a Matrix class. Read the "Quarks" helpfile if you're not familiar with quarks - SC's way to manage language extensions. Dan _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: matrix mathOn Monday 12 May 2008 15:35:05 Miguel Negrao wrote:
> Dan Stowell escreveu: > > My personal opinion (just 2p worth) is that it's not appropriate for > > the core Array class since it's only applicable to a particular sort > > of array. The Matrix class add-on does include matrix multiplication > > etc, makes more sense there. > > Is there a Matrix class ? I didn't find it... or are you suggesting one > should be made ? That would definetelly be usefull. On Monday 12 May 2008 11:50:51 Luke Selden wrote: > In the MathLib Quark there's a Matrix class that I haven't used but > might be worth looking into. sincerely, Marije _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: matrix mathnescivi escreveu:
> On Monday 12 May 2008 15:35:05 Miguel Negrao wrote: >> Dan Stowell escreveu: >>> My personal opinion (just 2p worth) is that it's not appropriate for >>> the core Array class since it's only applicable to a particular sort >>> of array. The Matrix class add-on does include matrix multiplication >>> etc, makes more sense there. >> Is there a Matrix class ? I didn't find it... or are you suggesting one >> should be made ? That would definetelly be usefull. > > On Monday 12 May 2008 11:50:51 Luke Selden wrote: >> In the MathLib Quark there's a Matrix class that I haven't used but >> might be worth looking into. > > sincerely, > Marije > _______________________________________________ > sc-users mailing list > sc-users@... > http://lists.create.ucsb.edu/mailman/listinfo/sc-users > > When i try to install the MathLib by the quarks.gui i have problem, nothing is present in the MathLib folder. I tryed uninstalling and installing again with no luck... any ideia on how to solve this ? Miguel _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: matrix mathIf you've never used Quarks before you probably need to checkout the
Quarks. I'm not at supercollider at the moment but in the Quarks helpfile I think it has the line Quarks.checkoutAll run that and a terminal window should pop up asking you to accept a svn certificate (sp?) -- select "P" and then it will download all the quarks for you. hope that helps- ~luke On Mon, May 12, 2008 at 1:40 PM, Miguel Negrao <miguel.negrao@...> wrote: > nescivi escreveu: >> On Monday 12 May 2008 15:35:05 Miguel Negrao wrote: >>> Dan Stowell escreveu: >>>> My personal opinion (just 2p worth) is that it's not appropriate for >>>> the core Array class since it's only applicable to a particular sort >>>> of array. The Matrix class add-on does include matrix multiplication >>>> etc, makes more sense there. >>> Is there a Matrix class ? I didn't find it... or are you suggesting one >>> should be made ? That would definetelly be usefull. >> >> On Monday 12 May 2008 11:50:51 Luke Selden wrote: >>> In the MathLib Quark there's a Matrix class that I haven't used but >>> might be worth looking into. >> >> sincerely, >> Marije >> _______________________________________________ >> sc-users mailing list >> sc-users@... >> http://lists.create.ucsb.edu/mailman/listinfo/sc-users >> >> > > When i try to install the MathLib by the quarks.gui i have problem, > nothing is present in the MathLib folder. I tryed uninstalling and > installing again with no luck... any ideia on how to solve this ? > > Miguel > _______________________________________________ > sc-users mailing list > sc-users@... > http://lists.create.ucsb.edu/mailman/listinfo/sc-users > sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: matrix mathI have some quarks instaled, i think I alread did that svn certificate
thing. When i do the command you mentioned i get: -------------------------------------------------------------- ? SuperCollider Quarks: accessing remote repository. ? If this is the first time, you may be asked to accept a ? security certificate. Please do so! ? The command being run is: export LANG='' ; /usr/bin/svn co https://quarks.svn.sourceforge.net/svnroot/quarks/ /Users/miguelnegrao/Library/Application\ Support/SuperCollider/quarks/ 2>&1 -------------------------------------------------------------- export LANG= svn: PROPFIND request failed on '/svnroot/quarks' svn: PROPFIND of '/svnroot/quarks': could not connect to server (https://quarks.svn.sourceforge.net) logout Luke Selden escreveu: > If you've never used Quarks before you probably need to checkout the > Quarks. I'm not at supercollider at the moment but in the Quarks > helpfile I think it has the line > > Quarks.checkoutAll > > run that and a terminal window should pop up asking you to accept a > svn certificate (sp?) -- select "P" and then it will download all the > quarks for you. > > hope that helps- > ~luke > > On Mon, May 12, 2008 at 1:40 PM, Miguel Negrao > <miguel.negrao@...> wrote: >> nescivi escreveu: >>> On Monday 12 May 2008 15:35:05 Miguel Negrao wrote: >>>> Dan Stowell escreveu: >>>>> My personal opinion (just 2p worth) is that it's not appropriate for >>>>> the core Array class since it's only applicable to a particular sort >>>>> of array. The Matrix class add-on does include matrix multiplication >>>>> etc, makes more sense there. >>>> Is there a Matrix class ? I didn't find it... or are you suggesting one >>>> should be made ? That would definetelly be usefull. >>> On Monday 12 May 2008 11:50:51 Luke Selden wrote: >>>> In the MathLib Quark there's a Matrix class that I haven't used but >>>> might be worth looking into. >>> sincerely, >>> Marije >>> _______________________________________________ >>> sc-users mailing list >>> sc-users@... >>> http://lists.create.ucsb.edu/mailman/listinfo/sc-users >>> >>> >> When i try to install the MathLib by the quarks.gui i have problem, >> nothing is present in the MathLib folder. I tryed uninstalling and >> installing again with no luck... any ideia on how to solve this ? >> >> Miguel >> _______________________________________________ >> sc-users mailing list >> sc-users@... >> http://lists.create.ucsb.edu/mailman/listinfo/sc-users >> > _______________________________________________ > sc-users mailing list > sc-users@... > http://lists.create.ucsb.edu/mailman/listinfo/sc-users > > _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: matrix mathI think there is a temporary outage of the SVN service. I've submitted
a support request to sf.net - hopefully it will be back online soon. Dan 2008/5/12 Miguel Negrao <miguel.negrao@...>: > I have some quarks instaled, i think I alread did that svn certificate > thing. When i do the command you mentioned i get: > > -------------------------------------------------------------- > > ? SuperCollider Quarks: accessing remote repository. > > ? If this is the first time, you may be asked to accept a > ? security certificate. Please do so! > > ? The command being run is: > export LANG='' ; /usr/bin/svn co > https://quarks.svn.sourceforge.net/svnroot/quarks/ > /Users/miguelnegrao/Library/Application\ Support/SuperCollider/quarks/ 2>&1 > > -------------------------------------------------------------- > export LANG= > svn: PROPFIND request failed on '/svnroot/quarks' > svn: PROPFIND of '/svnroot/quarks': could not connect to server > (https://quarks.svn.sourceforge.net) > logout > > > > Luke Selden escreveu: > > > > If you've never used Quarks before you probably need to checkout the > > Quarks. I'm not at supercollider at the moment but in the Quarks > > helpfile I think it has the line > > > > Quarks.checkoutAll > > > > run that and a terminal window should pop up asking you to accept a > > svn certificate (sp?) -- select "P" and then it will download all the > > quarks for you. > > > > hope that helps- > > ~luke > > > > On Mon, May 12, 2008 at 1:40 PM, Miguel Negrao > > <miguel.negrao@...> wrote: > >> nescivi escreveu: > >>> On Monday 12 May 2008 15:35:05 Miguel Negrao wrote: > >>>> Dan Stowell escreveu: > >>>>> My personal opinion (just 2p worth) is that it's not appropriate for > >>>>> the core Array class since it's only applicable to a particular sort > >>>>> of array. The Matrix class add-on does include matrix multiplication > >>>>> etc, makes more sense there. > >>>> Is there a Matrix class ? I didn't find it... or are you suggesting one > >>>> should be made ? That would definetelly be usefull. > >>> On Monday 12 May 2008 11:50:51 Luke Selden wrote: > >>>> In the MathLib Quark there's a Matrix class that I haven't used but > >>>> might be worth looking into. > >>> sincerely, > >>> Marije > >>> _______________________________________________ > >>> sc-users mailing list > >>> sc-users@... > >>> http://lists.create.ucsb.edu/mailman/listinfo/sc-users > >>> > >>> > >> When i try to install the MathLib by the quarks.gui i have problem, > >> nothing is present in the MathLib folder. I tryed uninstalling and > >> installing again with no luck... any ideia on how to solve this ? > >> > >> Miguel > >> _______________________________________________ > >> sc-users mailing list > >> sc-users@... > >> http://lists.create.ucsb.edu/mailman/listinfo/sc-users > >> > > _______________________________________________ > > sc-users mailing list > > sc-users@... > > http://lists.create.ucsb.edu/mailman/listinfo/sc-users > > > > > > _______________________________________________ > sc-users mailing list > sc-users@... > http://lists.create.ucsb.edu/mailman/listinfo/sc-users > -- http://www.mcld.co.uk _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: matrix mathIt seems to be back online now - try again!
2008/5/12 Dan Stowell <danstowell@...>: > I think there is a temporary outage of the SVN service. I've submitted > a support request to sf.net - hopefully it will be back online soon. > > Dan > > 2008/5/12 Miguel Negrao <miguel.negrao@...>: > > > > I have some quarks instaled, i think I alread did that svn certificate > > thing. When i do the command you mentioned i get: > > > > -------------------------------------------------------------- > > > > ? SuperCollider Quarks: accessing remote repository. > > > > ? If this is the first time, you may be asked to accept a > > ? security certificate. Please do so! > > > > ? The command being run is: > > export LANG='' ; /usr/bin/svn co > > https://quarks.svn.sourceforge.net/svnroot/quarks/ > > /Users/miguelnegrao/Library/Application\ Support/SuperCollider/quarks/ 2>&1 > > > > -------------------------------------------------------------- > > export LANG= > > svn: PROPFIND request failed on '/svnroot/quarks' > > svn: PROPFIND of '/svnroot/quarks': could not connect to server > > (https://quarks.svn.sourceforge.net) > > logout > > > > > > > > Luke Selden escreveu: > > > > > > > If you've never used Quarks before you probably need to checkout the > > > Quarks. I'm not at supercollider at the moment but in the Quarks > > > helpfile I think it has the line > > > > > > Quarks.checkoutAll > > > > > > run that and a terminal window should pop up asking you to accept a > > > svn certificate (sp?) -- select "P" and then it will download all the > > > quarks for you. > > > > > > hope that helps- > > > ~luke > > > > > > On Mon, May 12, 2008 at 1:40 PM, Miguel Negrao > > > <miguel.negrao@...> wrote: > > >> nescivi escreveu: > > >>> On Monday 12 May 2008 15:35:05 Miguel Negrao wrote: > > >>>> Dan Stowell escreveu: > > >>>>> My personal opinion (just 2p worth) is that it's not appropriate for > > >>>>> the core Array class since it's only applicable to a particular sort > > >>>>> of array. The Matrix class add-on does include matrix multiplication > > >>>>> etc, makes more sense there. > > >>>> Is there a Matrix class ? I didn't find it... or are you suggesting one > > >>>> should be made ? That would definetelly be usefull. > > >>> On Monday 12 May 2008 11:50:51 Luke Selden wrote: > > >>>> In the MathLib Quark there's a Matrix class that I haven't used but > > >>>> might be worth looking into. > > >>> sincerely, > > >>> Marije > > >>> _______________________________________________ > > >>> sc-users mailing list > > >>> sc-users@... > > >>> http://lists.create.ucsb.edu/mailman/listinfo/sc-users > > >>> > > >>> > > >> When i try to install the MathLib by the quarks.gui i have problem, > > >> nothing is present in the MathLib folder. I tryed uninstalling and > > >> installing again with no luck... any ideia on how to solve this ? > > >> > > >> Miguel > > >> _______________________________________________ > > >> sc-users mailing list > > >> sc-users@... > > >> http://lists.create.ucsb.edu/mailman/listinfo/sc-users > > >> > > > _______________________________________________ > > > sc-users mailing list > > > sc-users@... > > > http://lists.create.ucsb.edu/mailman/listinfo/sc-users > > > > > > > > > > _______________________________________________ > > sc-users mailing list > > sc-users@... > > http://lists.create.ucsb.edu/mailman/listinfo/sc-users > > > > > > > > -- > http://www.mcld.co.uk > -- http://www.mcld.co.uk _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
| Free Forum Powered by Nabble | Forum Help |