0% found this document useful (0 votes)
3 views2 pages

Examen Matlab 2021 - 2022

This document outlines the final exam for a computer tools module for the academic year 2021/2022, consisting of four exercises. The exercises require writing MATLAB functions and scripts for initializing matrices, calculating factorials, summing integers, and plotting functions. Emphasis is placed on the clarity and presentation of the answers.

Uploaded by

Nisrine Bourana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Examen Matlab 2021 - 2022

This document outlines the final exam for a computer tools module for the academic year 2021/2022, consisting of four exercises. The exercises require writing MATLAB functions and scripts for initializing matrices, calculating factorials, summing integers, and plotting functions. Emphasis is placed on the clarity and presentation of the answers.

Uploaded by

Nisrine Bourana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
>) ee eatin =< zs ‘Année Préparatorres 2 Année Universitaire : 2021/2022 Module : Outils informatique Examen final = Durée : 01h30min — NB: il sera tenu compte de la rigueur et de la coneision des réponses, I point réservé & la présemtation de la copie Exercice 1: (4 pts) Dans un fichier "Ex1Exam.m" écrire une fonction : function M = initialiserM(t,num) oi t est la taille de la matrice M et num est un numéro entre | 4 a choisir : Si num = 1, on initialise M par des zéros Si num = 2, on initialise M par des 1 Si num = 3, on initialise M par lidentité Si num = 4, on initialise M par 5 * Tidentité Exereice 2: (3 pts) A l'aide des commandes ‘input’, “disp’ et de la boucle *while ... end’, écrire un programme Matlab qui permet le calcul de la factorielle de n : nl =1+2+3+...+n (oii nest unentier). ‘Remarque : Utiliser la commande disp pour l’affichage en respectant la syntaxe. Exercice 3: (4 pts) Ecrire un script Matlab qui demande deux emtiers a et b et qui affiche le résultat de la somme Me i Remarque : Utiliser la commande disp pour I’affichage en respectant la syntaxe, Exercice 4: (4 pts) Soit la figure Matlab suivante sur laquelle nous avons tracé deux courbes : cos(x) et e*/2, fg 2: expe) f° al i — - hCrhrhUmE Ecrire les instructions Matlab (avec tous les détails) permettant de tracer cette figure. Soit la fonction suivante: z= c+ sin(2ma/x? + y) Avec:a=3; ¢=05; =-1

You might also like