Professional Documents
Culture Documents
Quote
Quote
komanda
Ushtrimi 1 Te shkruhet nje script qe merr dy numra nga perdoruesi dhe i krahason
atA
12
if x>
Te ndertohet nje script qe njehson vleren e shprehjes dhe me pas te ndertohet nje
funksion per te njejtin qellim:
xi = xi-1
for i=1:n
S= S+v(i) ;
end
end
x= [3 4 2 1 2 3 4 5 ] ; v=[2 3 4 1 2 ]
Shuma_Vektor (x)
function [P]=Prodhim_Tek(v)
P=1 ;
for i=1 : length(v) %i tregon pozicionin, v(i) tregon elementin e vektorit v ne
pozicionin
Ne qoofte
function[P]= Prodhimi_cift(A)
P= 1 ;
end
end
end
end