Rank: 214 based on 405 downloads (last 30 days) and 25 files submitted
photo

Sky Sartorius

E-mail
Company/University
Technical University of Munich
Lat/Long
48.26584, 11.6685

Personal Profile:

B.S. Aeronautical Engineering
M.Sc. Aerospace System Design


 

Watch this Author's files

 

Files Posted by Sky Sartorius View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
03 Dec 2014 Screenshot Dimensioned variable class - units support for MATLAB A new variable type allowing use of real-world units and dimensions with enforced unit consistency. Author: Sky Sartorius units, dimensioned, aerospace, imperial, si, dimensions 32 6
  • 5.0
5.0 | 2 ratings
03 Dec 2014 Screenshot LINK - object that displays as a hyperlink Similar to a string, but displays itself in the command window as a clickable link. Author: Sky Sartorius hyperlink, link, disp, display 13 1
  • 4.0
4.0 | 1 rating
03 Dec 2014 Screenshot DISPDISP - verbose display of structures and objects Display more information about field and properties of struct or object. Author: Sky Sartorius disp, display, structure, object, field, property 23 1
  • 4.0
4.0 | 1 rating
03 Dec 2014 tau - the circle constant For those who believe that pi is wrong. Author: Sky Sartorius pi, tau, circle, constant 12 0
20 Nov 2014 LINSPACE3: linearly spaced vector defined by three points Generate a vector as linearly spaced as possible while still including three defined points. Author: Sky Sartorius distributed, linspace, logspace, spaced, spacing, vector 7 0
Comments and Ratings by Sky Sartorius View all
Updated File Comments Rating
16 May 2014 Dimensioned variable class - units support for MATLAB A new variable type allowing use of real-world units and dimensions with enforced unit consistency. Author: Sky Sartorius

@Emanuele: I expanded size and the other oversimplified methods to support their full functionality. Thanks for inspiring me to go through and clean up and improve everything.

The "content" method you describe is the same as the existing "u2num" method.

13 Feb 2014 Dimensioned variable class - units support for MATLAB A new variable type allowing use of real-world units and dimensions with enforced unit consistency. Author: Sky Sartorius

In order to do what you describe, Thomas, u2num and unitsOf can't be normal methods of the class (at least not by themselves). I see three solutions to do what you want:

1) Make them static methods; add
isa(inVariable,'DimensionedVariable')
...
else
out = in;
end
This required writing "DimensionedVariable." before all function calls.
2) Move the unitsOf and u2num m files from the @DimensionedVariable folder to somewhere on your path (I suggest the same folder where units.m lives); add the same if/else as above.
3) Don't bother with "if isa(..." - just make a function on your path like
function [out] = u2num( varargin )
out = varargin{1};
end
MATLAB will use this for any input that isn't a DimensionedVariable.

I don't find any of the above solutions to be very elegant, which is why I haven't done any of them for the released submission. Perhaps someone here can suggest a more elegant solution.

P.S. I added the ability to switch base unit systems (e.g. use feet and lbs instead of meters and kg). Stay tuned for a new upload.

18 Apr 2013 addcopyright add copyright information to an m-file or group of m-files. Author: Mirko Hrovat

If I want to add/update copyright info for a file that's on the path but not in the current directory, a new version of the file (with copyright info) is created in the current directory. I changed line 180 to use uigetfile instead of uigetdir, which is more useful for me and helps with the aforementioned issue.

12 Apr 2013 Dimensioned variable class - units support for MATLAB A new variable type allowing use of real-world units and dimensions with enforced unit consistency. Author: Sky Sartorius

I uploaded a new version that, among other improvements, especially in documentation, has an entirely new subsasgn file that should take care of the removing elements problem and the preallocating problem. When doing subscripted assignment, you have to be assigning using input/output with the same units. The only exception is that NaN and [] are now allowed (either normal or with units). For preallocation, use a dimensioned NaN array. If you don't know the dimensions you'll need, the new subsasgn will allow changing the units of an all-NaN array to match the assigned variable (with a warning).

01 Dec 2012 Vectorized Bisection Search Robust root-finding method that handles n-dim inputs and therefore has key advantages over FZERO. Author: Sky Sartorius

I just uploaded an entirely new function with almost all new code and documentation and a lot of added features. With so much new code, please let me know if you find a bug.

This is about as far as I'll take this function. I would love to see MathWorks or someone in the community develop a vectorized implementation of Brent's method, i.e. make FZERO vectorized to be able handle array problems. A vectorized FZERO (with a TolFun feature) would be superior to this in every way.

Comments and Ratings on Sky Sartorius' Files View all
Updated File Comment by Comments Rating
16 Dec 2014 Vectorized Bisection Search Robust root-finding method that handles n-dim inputs and therefore has key advantages over FZERO. Author: Sky Sartorius SiddharthK

The vectorization feature is really really helpful. I was vexed with having to put fzero into for loops.

03 Dec 2014 LINK - object that displays as a hyperlink Similar to a string, but displays itself in the command window as a clickable link. Author: Sky Sartorius Matthew

Nice.

03 Dec 2014 DISPDISP - verbose display of structures and objects Display more information about field and properties of struct or object. Author: Sky Sartorius Matthew

Pretty :-)

25 Aug 2014 Vectorized Bisection Search Robust root-finding method that handles n-dim inputs and therefore has key advantages over FZERO. Author: Sky Sartorius Philip Ohnewein

Works brilliantly in my case. Replaces a loop with ~1 million iterations, brings down execution time by several orders of magnitude.
Plus it is well-written and well-documented and a numerically robust method.

16 May 2014 Dimensioned variable class - units support for MATLAB A new variable type allowing use of real-world units and dimensions with enforced unit consistency. Author: Sky Sartorius Sky Sartorius

@Emanuele: I expanded size and the other oversimplified methods to support their full functionality. Thanks for inspiring me to go through and clean up and improve everything.

The "content" method you describe is the same as the existing "u2num" method.

Contact us