Extract XData and YData from contourm hggroup handle
Mostra commenti meno recenti
Hello,
I would greatly appreciate some assistance to extract the XData and YData arrays, from the hgroup type handle of the contourm function:
[SC,h]=contourm(LatGrid,LonGrid,Cgrid,V,'Fill','on');
I require the XData and YData arrays as inputs to the following polybool function:
[xtrim, ytrim] = polybool('&', XData, YData, STlong, STlat);
thanks,
Mark
Risposta accettata
Più risposte (1)
per isakson
il 23 Gen 2014
This approach should do it (despite I don't know neither contourm nor polybool )
- find the handles of the line-objects
- use get( line_handle, 'Ydata' );
- etc
Hint:
>> plot( magic(5) )
>> fh = gcf;
>> lh = findobj( fh, 'Type', 'Line' );
>> y_data = get( lh(1), 'Ydata' );
>> y_data = cat( 1, y_data, get( lh(2), 'Ydata' ) );
>> y_data = cat( 1, y_data, get( lh(3), 'Ydata' ) );
>> y_data
y_data =
15 16 22 3 9
8 14 20 21 2
1 7 13 19 25
Categorie
Scopri di più su Graphics Object Properties in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!