Changeset 18252


Ignore:
Timestamp:
07/16/14 16:25:44 (11 years ago)
Author:
Mathieu Morlighem
Message:

NEW: enable to display structure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/processdata.m

    r17687 r18252  
    1515if (iscell(data) | isempty(data) | length(data)==0 | (length(data)==1 & ~isstruct(data) & isnan(data))),
    1616        error('plotmodel error message: data provided is empty');
     17end
     18
     19%specials for struct
     20if isstruct(data),
     21        disp('data provided is a struct, please enter the number of the field you would like to display:');
     22        F=fields(data);
     23        for i=1:numel(F),
     24                disp(['   ' num2str(i) ': ' F{i} ]);
     25        end
     26        choice=input(['please enter the field number? (between 1 and ' num2str(numel(F)) ')  ']);
     27        [data datatype]=processdata(md,data.(F{choice}),options);
    1728end
    1829
Note: See TracChangeset for help on using the changeset viewer.