IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Interfaces Graphiques Discussion :

appeler une figure a partir d'une autre figure en matlab


Sujet :

Interfaces Graphiques

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre actif
    Inscrit en
    Mars 2009
    Messages
    92
    Détails du profil
    Informations forums :
    Inscription : Mars 2009
    Messages : 92
    Par défaut appeler une figure a partir d'une autre figure en matlab
    salut
    j'ai des figures et je veux appeler une figure par une autre comment je vais le faire
    merci

  2. #2
    Expert confirmé
    Avatar de Caro-Line
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    9 458
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2007
    Messages : 9 458
    Par défaut
    Tu lances le fichier M associé à ta figure tout simplement.
    Exemple tu as figure1.m et figure2.m.
    Dans figure1.m :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    figure2%ouvre la figure 2

  3. #3
    Membre actif
    Inscrit en
    Mars 2009
    Messages
    92
    Détails du profil
    Informations forums :
    Inscription : Mars 2009
    Messages : 92
    Par défaut
    j'ai éssayé ta proposition mais il pose l'érreur suivante:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    Error in ==> untitled>Untitled_11_Callback at 109
    enregistrement%ouvre la figure 2
     
    Error in ==> gui_mainfcn at 75
            feval(varargin{:});
     
    Error in ==> untitled at 42
        gui_mainfcn(gui_State, varargin{:});
     
    ??? Error using ==> untitled('Untitled_11_Callback',gcbo,[],guidata(gcbo))
    Undefined function or variable 'figure2'.
     
    ??? Error while evaluating uimenu Callback

  4. #4
    Expert confirmé
    Avatar de Caro-Line
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    9 458
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2007
    Messages : 9 458
    Par défaut
    C'est bizarre qu'il te dise ça :
    Undefined function or variable 'figure2'
    Alors que manifestement ta 2ème figure s'appelle enregistrement, c'est ça ?
    Peux-tu montrer le morceau de code que tu as écrit ?

    NB : ce n'est pas très recommandé de garder le nom par défaut (Untitled) comme nom de figure...

  5. #5
    Membre actif
    Inscrit en
    Mars 2009
    Messages
    92
    Détails du profil
    Informations forums :
    Inscription : Mars 2009
    Messages : 92
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    function Untitled_11_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_11 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
    enregistrement%ouvre la figure 2

  6. #6
    Expert confirmé
    Avatar de Caro-Line
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    9 458
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2007
    Messages : 9 458
    Par défaut
    Et il y a a quoi dans enregistrement.m ?

  7. #7
    Membre actif
    Inscrit en
    Mars 2009
    Messages
    92
    Détails du profil
    Informations forums :
    Inscription : Mars 2009
    Messages : 92
    Par défaut
    VOILA les deux figures

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    function varargout = untitled(varargin)
    % UNTITLED M-file for untitled.fig
    %      UNTITLED, by itself, creates a new UNTITLED or raises the existing
    %      singleton*.
    %
    %      H = UNTITLED returns the handle to a new UNTITLED or the handle to
    %      the existing singleton*.
    %
    %      UNTITLED('CALLBACK',hObject,eventData,handles,...) calls the local
    %      function named CALLBACK in UNTITLED.M with the given input arguments.
    %
    %      UNTITLED('Property','Value',...) creates a new UNTITLED or raises the
    %      existing singleton*.  Starting from the left, property value pairs are
    %      applied to the GUI before untitled_OpeningFunction gets called.  An
    %      unrecognized property name or invalid value makes property application
    %      stop.  All inputs are passed to untitled_OpeningFcn via varargin.
    %
    %      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
    %      instance to run (singleton)".
    %
    % See also: GUIDE, GUIDATA, GUIHANDLES
     
    % Edit the above text to modify the response to help untitled
     
    % Last Modified by GUIDE v2.5 05-Jun-2009 09:27:11
     
    % Begin initialization code - DO NOT EDIT
    gui_Singleton = 1;
    gui_State = struct('gui_Name',       mfilename, ...
                       'gui_Singleton',  gui_Singleton, ...
                       'gui_OpeningFcn', @untitled_OpeningFcn, ...
                       'gui_OutputFcn',  @untitled_OutputFcn, ...
                       'gui_LayoutFcn',  [] , ...
                       'gui_Callback',   []);
    if nargin && ischar(varargin{1})
        gui_State.gui_Callback = str2func(varargin{1});
    end
     
    if nargout
        [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
    else
        gui_mainfcn(gui_State, varargin{:});
    end
    % End initialization code - DO NOT EDIT
     
     
    % --- Executes just before untitled is made visible.
    function untitled_OpeningFcn(hObject, eventdata, handles, varargin)
    % This function has no output args, see OutputFcn.
    % hObject    handle to figure
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
    % varargin   command line arguments to untitled (see VARARGIN)
     
    % Choose default command line output for untitled
    handles.output = hObject;
     
    % Update handles structure
    guidata(hObject, handles);
     
    % UIWAIT makes untitled wait for user response (see UIRESUME)
    % uiwait(handles.figure1);
     
     
    % --- Outputs from this function are returned to the command line.
    function varargout = untitled_OutputFcn(hObject, eventdata, handles) 
    % varargout  cell array for returning output args (see VARARGOUT);
    % hObject    handle to figure
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
    % Get default command line output from handles structure
    varargout{1} = handles.output;
     
     
    % --------------------------------------------------------------------
    function Untitled_1_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_1 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --------------------------------------------------------------------
    function Untitled_2_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_2 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --------------------------------------------------------------------
    function Untitled_7_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_7 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --------------------------------------------------------------------
    function Untitled_10_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_10 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --------------------------------------------------------------------
    function Untitled_11_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_11 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
    enregistrement%ouvre la figure 2
     
    % --------------------------------------------------------------------
    function Untitled_12_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_12 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --------------------------------------------------------------------
    function Untitled_14_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_14 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --------------------------------------------------------------------
    function Untitled_15_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_15 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --------------------------------------------------------------------
    function Untitled_16_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_16 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --------------------------------------------------------------------
    function Untitled_3_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_3 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --------------------------------------------------------------------
    function Untitled_4_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_4 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --------------------------------------------------------------------
    function Untitled_5_Callback(hObject, eventdata, handles)
    % hObject    handle to Untitled_5 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
     
     
    % --- Executes on button press in pushbutton1.
    function pushbutton1_Callback(hObject, eventdata, handles)
    % hObject    handle to pushbutton1 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --- Executes on button press in pushbutton2.
    function pushbutton2_Callback(hObject, eventdata, handles)
    % hObject    handle to pushbutton2 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --- Executes on button press in pushbutton3.
    function pushbutton3_Callback(hObject, eventdata, handles)
    % hObject    handle to pushbutton3 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    function varargout = enregistrement(varargin)
    % ENREGISTREMENT M-file for enregistrement.fig
    %      ENREGISTREMENT, by itself, creates a new ENREGISTREMENT or raises the existing
    %      singleton*.
    %
    %      H = ENREGISTREMENT returns the handle to a new ENREGISTREMENT or the handle to
    %      the existing singleton*.
    %
    %      ENREGISTREMENT('CALLBACK',hObject,eventData,handles,...) calls the local
    %      function named CALLBACK in ENREGISTREMENT.M with the given input arguments.
    %
    %      ENREGISTREMENT('Property','Value',...) creates a new ENREGISTREMENT or raises the
    %      existing singleton*.  Starting from the left, property value pairs are
    %      applied to the GUI before enregistrement_OpeningFunction gets called.  An
    %      unrecognized property name or invalid value makes property application
    %      stop.  All inputs are passed to enregistrement_OpeningFcn via varargin.
    %
    %      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
    %      instance to run (singleton)".
    %
    % See also: GUIDE, GUIDATA, GUIHANDLES
     
    % Edit the above text to modify the response to help enregistrement
     
    % Last Modified by GUIDE v2.5 05-Jun-2009 09:17:20
     
    % Begin initialization code - DO NOT EDIT
    gui_Singleton = 1;
    gui_State = struct('gui_Name',       mfilename, ...
                       'gui_Singleton',  gui_Singleton, ...
                       'gui_OpeningFcn', @enregistrement_OpeningFcn, ...
                       'gui_OutputFcn',  @enregistrement_OutputFcn, ...
                       'gui_LayoutFcn',  [] , ...
                       'gui_Callback',   []);
    if nargin && ischar(varargin{1})
        gui_State.gui_Callback = str2func(varargin{1});
    end
     
    if nargout
        [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
    else
        gui_mainfcn(gui_State, varargin{:});
    end
    % End initialization code - DO NOT EDIT
     
     
    % --- Executes just before enregistrement is made visible.
    function enregistrement_OpeningFcn(hObject, eventdata, handles, varargin)
    % This function has no output args, see OutputFcn.
    % hObject    handle to figure
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
    % varargin   command line arguments to enregistrement (see VARARGIN)
     
    % Choose default command line output for enregistrement
    handles.output = hObject;
     
    % Update handles structure
    guidata(hObject, handles);
     
    % UIWAIT makes enregistrement wait for user response (see UIRESUME)
    % uiwait(handles.figure1);
     
     
    % --- Outputs from this function are returned to the command line.
    function varargout = enregistrement_OutputFcn(hObject, eventdata, handles) 
    % varargout  cell array for returning output args (see VARARGOUT);
    % hObject    handle to figure
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
    % Get default command line output from handles structure
    varargout{1} = handles.output;
     
     
    % --- Executes on button press in pushbutton1.
    function pushbutton1_Callback(hObject, eventdata, handles)
    % hObject    handle to pushbutton1 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --- Executes on button press in pushbutton2.
    function pushbutton2_Callback(hObject, eventdata, handles)
    % hObject    handle to pushbutton2 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --- Executes on button press in pushbutton3.
    function pushbutton3_Callback(hObject, eventdata, handles)
    % hObject    handle to pushbutton3 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --- Executes on button press in pushbutton4.
    function pushbutton4_Callback(hObject, eventdata, handles)
    % hObject    handle to pushbutton4 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
    dans le menu de la figure untiteled on clique dans wave --> enregistrement pour lancer la figure enregistrement
    Fichiers attachés Fichiers attachés
    • Type de fichier : rar I.rar (7,7 Ko, 82 affichages)

  8. #8
    Expert confirmé
    Avatar de Caro-Line
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    9 458
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2007
    Messages : 9 458
    Par défaut
    ça fonctionne chez moi...

Discussions similaires

  1. appeler une figure a partir d'une autre
    Par fleurrouge dans le forum Interfaces Graphiques
    Réponses: 1
    Dernier message: 01/09/2013, 23h24
  2. Réponses: 4
    Dernier message: 10/10/2010, 11h46
  3. Réponses: 2
    Dernier message: 05/03/2010, 14h15
  4. Réponses: 1
    Dernier message: 15/05/2008, 20h00
  5. comment appeler une requete a partir d'une autre ?
    Par DjBeGi dans le forum Access
    Réponses: 2
    Dernier message: 01/06/2006, 14h39

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo