تسجيل الدخول

مشاهدة النسخة كاملة : طلب مساعدة في حل تمرين matlab


m4hfoud
2016-04-22, 13:52
السلام عليكم
التمرين موجود في الصورة و هو يتكون من 5 أسئلة لقد تمكنت من حل 1 و 2 و 3


1-
fplot(@(x)sin(x-2)+4,[2*pi pi/2])
2-
fplot(@(x)-2*x^3+x^2-3,[-5 5])
لم أعرف كيفية إضافة الخطوة ( le pas) إليه
3-
hold on
و نعيد كتابت الأوامر السابقة



أتمنى أن أجد مساعدة في حل 4 و 5



http://img15.hostingpics.net/thumbs/mini_70617620160420115248.jpg (http://www.hostingpics.net/viewer.php?id=70617620160420115248.jpg)

absosm
2016-04-24, 18:18
بارك الله فيك شكرا

ghalas
2016-06-29, 14:52
Voici une solution de cet exercice
clc
clear
% Question N°1
x=0:pi/2:2*pi;% le pas de variation de x
F=sin(x-2)+4; % la fonction f(x)
%plot(x,F)
% Question N°2
y=[-5:0,2:5]; % la pas de variation de x
G=-2*y.^3+y.^2-3; % la fonction g(x)
%plot(y,G)
% Question N°3 et % Question N°4
subplot(2,1,1) % 2 lignes 1 colone 1er ligne
plot(x,F,'gd:')%g pour couleur vert, d pour losange,: pour pointillés
title('\fontsize{16}\color{red}Tracer des courbes')%titre figure
xlabel('Axe des X') %titre axe x
Ylabel('Axe des F(X)') %titre axe y
subplot(2,1,2) % 2 lignes 1 colone 2ieme ligne
plot(y,G,'gd:')%g pour couleur vert, d pour losange,: pour pointillés
xlabel('Axe des X') %titre axe x
Ylabel('Axe des G(Y)') %titre axe y

Vous pouvez copier et coller ce programme dans un fichier .mfile du matlab et l’exécuter
Le programme
http://img15.hostingpics.net/pics/649110prog.jpg
Résultat d’exécution
http://img15.hostingpics.net/pics/593198courbe.jpg

ghalas
2016-06-29, 16:11
Voici un livre Matlab pour débutants
Telecharger (http://uptobox.com/70dmoooc1sok)