Community Profile

Brandon


14 total contributions since 2008

Contact

Contributions in
View by

Responded


Re: Recursive anonymous function
Actually, the description lisp-like is not correct. Maybe lambda expression evaluator is a better one

7 years ago | 12894 views

Responded


Re: Recursive anonymous function
Bruno Thank you for pointing me to this function. It has actually answered my question. An anonymous function is a closure whi...

7 years ago | 12894 views

Responded


Re: Recursive anonymous function
Bruno, Please create an m-file and put the following code in it function res = sumv() end then run it. I get an answer of 15, ...

7 years ago | 12894 views

Responded


Re: Convert number to array
us, Your solution is very appealling to me, esp the brevity of it. I looked at mine again. I works only on row vectors so ...

7 years ago | 24657 views

Responded


Re: Recursive anonymous function
Hi Bruno, I see where you are having issues with iff and its use for recursion. You are correct that iff will evaluate both con...

7 years ago | 12894 views

Responded


Re: Convert number to array
us, Thank you for your reply. I hadn't considered the boundary conditions (arrays with variable length digits) as I was looking...

7 years ago | 24657 views

Posted


Recursive anonymous function
Bruno I encourage you to read the entire post. The recursion does work when declared inside an m-file (My query is about scope ...

7 years ago | 12894 views

Responded


Re: Convert number to array
Hi per, Thats a very novel approach you have taken. It didn't occur to me to use the sscanf format specifier with padding. How...

7 years ago | 24657 views

Posted


Recursive anonymous function
Hello, I have been playing with anonymous functions. As you cannot have if or while statements, I am trying to see if I can emu...

7 years ago | 12894 views

Responded


Re: Convert number to array
Thank you for your reply Per Unfortunately, it has confused me a little. I believe sprintf and sscanf take string inputs whils...

7 years ago | 24657 views

Responded


Re: Convert number to array
While playing with something unrelated I found I could do num2str(1234)*1+'0' => [1, 2 ,3, 4] Now to work out if i can avoid c...

7 years ago | 24657 views

Posted


Convert number to array
Hello, I've been doing project euler exercises as a way of revising matlab. For a number of the problems I have come up with so...

7 years ago | 24657 views

Responded


Re: Array of Repeated Values
40:pi/3); vectors here will be pi/2, the 2*pi/3, resp., Roger, Thank you for your help. This is exactly what I wanted. Sin...

8 years ago | 2413 views

Posted


Array of Repeated Values
Hi, I am currently working on a project that has a doubly- nested for loop. I wish to vectorize the loop as its takes too long...

8 years ago | 2413 views