Community Profile

Ben


Northwestern

128 total contributions since 2011

Contact

Contributions in
View by

Posted


Updating LEGEND in loop after CLA
I've got a custom function similar to COMET (shows an animation of a trajectory). After a few iterations, I clear the figure us...

4 years ago | 2338 views

Responded


Re: rows of matrix quantization
Not really sure what you're after... Your rows in A must be the same length, so the example doesn't make sense. Also, the start...

4 years ago | 1712 views

Responded


Re: sorting arrays in a cell array
This is something I've wanted for a long time. I usually just use a for loop. If you can switch the indices or use a multi-ind...

4 years ago | 8988 views

Responded


Re: Anonymous persist through power cycle
Thanks, dpb. What do you mean by the target of SAVE? I'm saving the output of BuildStruct to a .mat file and then loading that...

4 years ago | 1828 views

Posted


Anonymous persist through power cycle
Say I wanted to get an anonymous function to persist to a different MATLAB session without requiring a path addition. Is it pos...

4 years ago | 1828 views

Responded


Re: trouble saving data structure to a file
It seems like you could approach this a few different ways. First, like you say, if SAVE could figure out the '.' notation, the...

4 years ago | 5519 views

Responded


Re: Strange Anonymous Behavior
I didn't know about FUNCTIONS. Thanks for the info. Yes, I understand that the helper variable 'n' is saved. This is cool,...

4 years ago | 2706 views

Responded


Re: Strange Anonymous Behavior
Sorry, "non-determinate" implies the results of the calculation wasn't the same. I did not mean to imply that. I should have s...

4 years ago | 2706 views

Responded


Re: Find common points in a set of data !!!
Look at the functions INTERSECT, UNIQUE, UNION. I could see any of them helping you out.

4 years ago | 1354 views

Responded


Re: Strange Anonymous Behavior
Alright, I think I've figured it out. I'll post this in case someone google-stumbles (googumbles? stoogles?) onto this entry. ...

4 years ago | 2706 views

Responded


Re: Problem with string
I changed mes from a character array to a cell array. Then I changed the if statement you were discussing to index into the cel...

4 years ago | 1509 views

Posted


Strange Anonymous Behavior
This might get a little complicated, but hopefully I can explain my predicament. I have a matlab function (let's call it "sift....

4 years ago | 2706 views

Responded


Re: Finding Identical Elements in Different Structures
I've found this file on the file exchange helpful before... http://www.mathworks.com/matlabcentral/fileexchange/22752-compare-...

4 years ago | 5992 views

Responded


Re: Creating sub-matrices from a matrix
Ahh, ok. When I pasted the data into excel, I removed the leading white spaces from the 'Score' column. With the spaces in the...

4 years ago | 2845 views

Responded


Re: Creating sub-matrices from a matrix
Ok. Then we probably have differently formatted excel files. I just copied what you posted earlier into an excel sheet -- perh...

4 years ago | 2845 views

Responded


Re: Creating sub-matrices from a matrix
Haven't done much reading from excel myself, but I do know MATLAB has an XLSREAD function. Others might be able to give you cle...

4 years ago | 2845 views

Responded


Re: Passing String Variables
Alright, before I answer the question, let me put this out there: there are a number of ways that the approach you're taking cou...

4 years ago | 4006 views

Responded


Re: Passing String Variables
What's the error you're actually getting? This works fine for me (R2012a). Here's what I ran: %%%%%%% SCRIPT (called runme.m):...

4 years ago | 4006 views

Responded


Re: Threshold
Maybe I'm not understanding it, but I would think logical indexing would work well for this. Hope that helps.

4 years ago | 1740 views

Responded


Re: isinline equivalent
Sorry for a delayed thanks, but thanks to you both. Steve, I think yours is more elegant and will use it from now on.

4 years ago | 1441 views

Posted


isinline equivalent
I'm looking for a way to identify an inline function. b = 1; c = 2; d = 3; f = inline('b+c*d',b,c,d); I want to use something ...

4 years ago | 1441 views

Responded


Re: Creating a Variable Name from a String
I'm not sure whether I should give you the bullet you can use to shoot yourself in the foot, but here you go. help eval EVAL w...

4 years ago | 1690 views

Responded


Re: how to add path in run time
Have you tried using addpath and rmpath?

4 years ago | 1688 views

Responded


Re: Find files with specific extension
I've done something similar before, using regexp. Here are two lines that'll push you down the right path: license.txt pate...

4 years ago | 29821 views

Responded


Re: test
it worked!

4 years ago | 678 views

Responded


Re: Inline reference a variable in workspace
oh wait, just got the Star Wars, Harrison-Ford-in-a-storm-trooper-costume-quote. Gotcha. :)

4 years ago | 3311 views

Responded


Re: Inline reference a variable in workspace
Star Strider: I looked into openvar. I often double click on variables in my workspace to open them in the variable editor. I...

4 years ago | 3311 views

Responded


Re: Inline reference a variable in workspace
Thanks, but if I can't change types, it breaks. This is why I want MyFun (however it's implemented) to look at what's currently...

4 years ago | 3311 views

Responded


Re: Inline reference a variable in workspace
basically, something like this: ans = But instead of sending in types(a(4), I just want to say MyFun(4)

4 years ago | 3311 views

Responded


Re: Inline reference a variable in workspace
Thanks, Steve, for the response. My comments are intermixed below: Yes, thank you. I realize this is a possibility, but I wa...

4 years ago | 3311 views

Load more