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

MATLAB Discussion :

Je n'ai pas compris l'erreur


Sujet :

MATLAB

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Candidat au Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Mai 2014
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 32
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Mai 2014
    Messages : 11
    Points : 2
    Points
    2
    Par défaut Je n'ai pas compris l'erreur
    Bonjour,

    Je ne comprends pas où est le problème

    Merci
    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
    function varargout = pfe2014(varargin)
    % PFE2014 MATLAB code for pfe2014.fig
    %      PFE2014, by itself, creates a new PFE2014 or raises the existing
    %      singleton*.
    %
    %      H = PFE2014 returns the handle to a new PFE2014 or the handle to
    %      the existing singleton*.
    %
    %      PFE2014('CALLBACK',hObject,eventData,handles,...) calls the local
    %      function named CALLBACK in PFE2014.M with the given input arguments.
    %
    %      PFE2014('Property','Value',...) creates a new PFE2014 or raises the
    %      existing singleton*.  Starting from the left, property value pairs are
    %      applied to the GUI before pfe2014_OpeningFcn gets called.  An
    %      unrecognized property name or invalid value makes property application
    %      stop.  All inputs are passed to pfe2014_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 pfe2014
    % Last Modified by GUIDE v2.5 03-May-2014 15:12:22
    % Begin initialization code - DO NOT EDIT
    gui_Singleton = 1;
    gui_State = struct('gui_Name',       mfilename, ...
                       'gui_Singleton',  gui_Singleton, ...
                       'gui_OpeningFcn', @pfe2014_OpeningFcn, ...
                       'gui_OutputFcn',  @pfe2014_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 pfe2014 is made visible.
    function pfe2014_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 pfe2014 (see VARARGIN)
    % Choose default command line output for pfe2014
    handles.output = hObject;
    % Update handles structure
    guidata(hObject, handles);
    % UIWAIT makes pfe2014 wait for user response (see UIRESUME)
    % uiwait(handles.figure1);
    % --- Outputs from this function are returned to the command line.
    function varargout = pfe2014_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 selection change in popupmenu1.
    function popupmenu1_Callback(hObject, eventdata, handles)
    % hObject    handle to popupmenu1 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
    % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1 contents as cell array
    %        contents{get(hObject,'Value')} returns selected item from popupmenu1
    % --- Executes during object creation, after setting all properties.
    function popupmenu1_CreateFcn(hObject, eventdata, handles)
    % hObject    handle to popupmenu1 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    empty - handles not created until after all CreateFcns called
    % Hint: popupmenu controls usually have a white background on Windows.
    %       See ISPC and COMPUTER.
    if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
        set(hObject,'BackgroundColor','white');
    end
    % --- Executes on selection change in popupmenu2.
    function popupmenu2_Callback(hObject, eventdata, handles)
    % hObject    handle to popupmenu2 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
    % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu2 contents as cell array
    %        contents{get(hObject,'Value')} returns selected item from popupmenu2
    % --- Executes during object creation, after setting all properties.
    function popupmenu2_CreateFcn(hObject, eventdata, handles)
    % hObject    handle to popupmenu2 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    empty - handles not created until after all CreateFcns called
    % Hint: popupmenu controls usually have a white background on Windows.
    %       See ISPC and COMPUTER.
    if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
        set(hObject,'BackgroundColor','white');
    end
    % --- Executes on selection change in popupmenu3.
    function popupmenu3_Callback(hObject, eventdata, handles)
    % hObject    handle to popupmenu3 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
    % Hints: contents = cellstr(get(hObject,'String')) returns popupmenu3 contents as cell array
    %        contents{get(hObject,'Value')} returns selected item from popupmenu3
    % --- Executes during object creation, after setting all properties.
    function popupmenu3_CreateFcn(hObject, eventdata, handles)
    % hObject    handle to popupmenu3 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    empty - handles not created until after all CreateFcns called
    % Hint: popupmenu controls usually have a white background on Windows.
    %       See ISPC and COMPUTER.
    if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     
        set(hObject,'BackgroundColor','white');
    end
    function uipanel1_SelectionChangeFcn(hObject, eventdata, handles)
    % hObject    handle to the selected object in uipanel1 
    % eventdata  structure with the following fields (see UIBUTTONGROUP)
    %	EventName: string 'SelectionChanged' (read only)
    %	OldValue: handle of the previously selected object or empty if none was selected
    %	NewValue: handle of the currently selected object
    % handles    structure with handles and user data (see GUIDATA)
    % --- Executes on button press in pushbutton1.
    function pushbutton1_Callback(hObject, eventdata, handles)
    a=get(handles.popupmenu1,'value');
    val=get(handles.popupmenu2,'value');
    pha=get(handles.popupmenu3,'value');
    res=get(handles.uipannel1,'string');
    if res=='Amplitude'
        figure
        result=Exemple1(a);
    elseif a==10 & res=='Phase'
        result=test(pha);
    elseif a==10 & res=='Amplitude&phase'
        figure
        result=code1(pha,val);   
    else
        ms = msgbox('erreur','mesage d erreur');
    end
     
    % 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 out.
    function out_Callback(hObject, eventdata, handles)
    % hObject    handle to out (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
    close(pfe2014);
    % --- Executes on button press in out.
    function choix_Callback(hObject, eventdata, handles)
    % hObject    handle to out (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)

  2. #2
    Invité
    Invité(e)
    Par défaut
    Bonsoir tout d'abord,

    Pourrait-on justement savoir quel est le problème ? Il serait bienvenu de l'expliquer clairement, pas que l'on ait à le deviner.

    En parcourant vite fait ton code, je peux déjà te diriger vers la FAQ :
    Comment comparer des chaines de caractères ?
    et pfe2014 dans la ligne close(pfe2014); serait à replacer par gcbf.

  3. #3
    Candidat au Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Mai 2014
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 32
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Mai 2014
    Messages : 11
    Points : 2
    Points
    2
    Par défaut bonjour
    bonjour a tous
    je n'ai compris pas si le probème de la comparaison de chaine ou autre car aussi la récupération de donné ne fonctionne pas svp si possible donné une solution

  4. #4
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 52 882
    Points
    52 882
    Par défaut
    La FAQ est pourtant suffisamment claire

    Il faut remplacer

    par

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    strcmp(res, 'Amplitude')
    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

  5. #5
    Candidat au Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Mai 2014
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 32
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Mai 2014
    Messages : 11
    Points : 2
    Points
    2
    Par défaut
    bonjours,voici les erreurs qui est affiché après l’exécution de cette code svp trouver une solution??
    ??? Reference to non-existent field 'uipannel1'.
    
    Error in ==> interface1>valider_Callback at 153
    res=get(handles.uipannel1,'string');
    
    Error in ==> gui_mainfcn at 96
            feval(varargin{:});
    
    Error in ==> interface1 at 42
        gui_mainfcn(gui_State, varargin{:});
    
    Error in ==> @(hObject,eventdata)interface1('valider_Callback',hObject,eventdata,guidata(hObject))
    
     
    ??? Error while evaluating uicontrol Callback

  6. #6
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 302
    Points : 52 882
    Points
    52 882
    Par défaut
    Montre nous le code en entier
    Ingénieur indépendant en mécatronique - Conseil, conception et formation
    • Conception mécanique (Autodesk Fusion 360)
    • Impression 3D (Ultimaker)
    • Développement informatique (Python, MATLAB, C)
    • Programmation de microcontrôleur (Microchip PIC, ESP32, Raspberry Pi, Arduino…)

    « J'étais le meilleur ami que le vieux Jim avait au monde. Il fallait choisir. J'ai réfléchi un moment, puis je me suis dit : "Tant pis ! J'irai en enfer" » (Saint Huck)

Discussions similaires

  1. message erreur pas compris
    Par heart100 dans le forum Firebird
    Réponses: 5
    Dernier message: 11/03/2015, 18h05
  2. [Débutant] problème d'une erreur et je n'ai pas compris qu'est ce qu'il faut changer ?
    Par Riahi_khoubeib dans le forum VB.NET
    Réponses: 3
    Dernier message: 24/02/2014, 17h24
  3. Msg d'erreur n'est pas compris
    Par nanouchg dans le forum Interfaces Graphiques
    Réponses: 3
    Dernier message: 18/03/2011, 14h29
  4. Réponses: 1
    Dernier message: 17/10/2007, 09h31
  5. Debutant , j'ai pas compris cette erreur
    Par StyleXP dans le forum Langage
    Réponses: 11
    Dernier message: 05/09/2006, 20h45

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