Matlab 2015 vs Matlab 2013. Using the Dwork vector to pass axes handles (now graphics objects)
Show older comments
In Matlab 2013 the command axes provided a double. It would appear that in Matlab 2015 the commands 'axes' of 'gca' provide the user with an object. Ok.
Prior to upgrading to Matlab 2015 I was using an sfunction that makes use of the Dwork vector i.e. I have been using the PostPropagationSetup method as follows;
function DoPostPropSetup (block)
block.NumDworks = 1;
block.Dwork(1).Name = 'fighandle';
block.Dwork(1).Dimensions = 1;
block.Dwork(1).DatatypeID = 0;
block.Dwork(1).Complexity = 'Real';
Within the Start function - Start(block) the axes handle is captured. I currently store the axes handle in the Dwork vector like so
set (h_figure, ...
'NumberTitle', 'off', ...
'Name', 'aircraft animation', ...
'BackingStore','off', ...
'MenuBar', 'figure', ...
'Position', [10 42 500 500]);
h_axes = axes;
block.Dwork(1).Data = h_axes;
The difficult I now have is that in Matlab 2015 the call to 'axes' now returns an object, not a double. Unfortunately the datatypeID of block.Dwork(1).Data must be one of the following
-1 for 'inherited',
0 for 'double',
1 for 'single',
2 for 'int8',
3 for 'uint8',
4 for 'int16',
5 for 'uint16',
6 for 'int32',
7 for 'uint32',
8 for 'boolean"
Any suggestions would be appreciated!
Regards,
Oliver
Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!