From: Sofia Häggberg on 3 Aug 2010 05:41 let say I have this function: function test n=10000 x = zeros(1,n); for i = 1:n, x(i) = i; end end When I am running this function I would to access the results in workspace! Any help please... as I dont know how to make them visible or memorize in the workspace...
From: us on 3 Aug 2010 05:44 On Aug 3, 11:41 am, "Sofia Häggberg" <hd.int.assNOS...(a)gmail.com> wrote: > let say I have this function: > > function test > n=10000 > x = zeros(1,n); > for i = 1:n, > x(i) = i; > end > end > > When I am running this function I would to access the results in workspace! Any help please... as I dont know how to make them visible or memorize in the workspace... well... what about returning the result(?)... one of the solutions function x=test % your code end % at the command prompt r=test; us
From: Sofia Häggberg on 3 Aug 2010 06:01 us <us(a)neurol.unizh.ch> wrote in message <8c004ab2-ce04-41f0-b767-224835029635(a)k19g2000yqc.googlegroups.com>... > On Aug 3, 11:41 am, "Sofia Häggberg" <hd.int.assNOS...(a)gmail.com> > wrote: > > let say I have this function: > > > > function test > > n=10000 > > x = zeros(1,n); > > for i = 1:n, > > x(i) = i; > > end > > end > > > > When I am running this function I would to access the results in workspace! Any help please... as I dont know how to make them visible or memorize in the workspace... > > well... what about returning the result(?)... > > one of the solutions > > function x=test > % your code > end > > % at the command prompt > r=test; > > us dear us, thank you! but your answer/s are not clear to me... (since they're not working) looking forward someone else to help me out... with this (and other problems)
From: Jan Simon on 3 Aug 2010 06:27 Dear Sofia, > > well... what about returning the result(?)... > > > > one of the solutions > > > > function x=test > > % your code > > end > > > > % at the command prompt > > r=test; > > us > > dear us, > thank you! but your answer/s are not clear to me... (since they're not working) > looking forward someone else to help me out... with this (and other problems) The answer of Urs works and btw. is the simplest, fastest and clearest (== best) solution. So if you state "they're not working", please give us any details of what you have done exactly and if an error message appears (which?) or if the results differ from your expectations. If the answer is not clear to you, you could ask for some explanations of a specific line or command. After reading this newsgroup for some years, I'd think twice before I assume, that an answer of Urs does not work. Kind regards, Jan
|
Pages: 1 Prev: about governor paramerter Next: connected component labeling |