We investigate functional nanostructures from the viewpoint of the connection of the function to the underlying electronic and geometric structure. For example, magnetic nanostructures for data storage are characterized with respect to the magnetic parameters such as the switching field distribution. This functionality is correlated with structural properties such as shape, anisotropy or grain structure. The influence on the relevant physics processes such as domain wall displacement, switching energy barriers etc. is investigated.