Results 1 to 6 of 6
Thread: Matlab
Hybrid View
-
20th October 2013 15:04 #1
Matlab
, , ,
( , 3
)
" H(5,5). - 0 , . "
:
Code:for i=1:1:5 for j=1:1:5 H(i,j)=input(['H(',num2str(i),',',num2str(j),')=']); end end disp('H='); disp(H) if H(H(1,:)>0 disp(v1=H(i,:))
"diag V" :/
,
Last edited by gabrovec; 20th October 2013 at 22:37.
-
20th October 2013 15:17 #2
-
20th October 2013 19:36 #3
-
20th October 2013 20:50 #4
elementi=5;
H=rand(elementi);
% / , ; , , elementi=length(H)
for i=1:elementi
if H(i,1)>0
v(i)=1;
else
v(i)=0;
end
end
if sum(v)==elementi
izvlechenie=H(:,1);
else
izvlechenie=sum(diag(H));
end
disp(izvlechenie);
, . , , , , . . ......... , . '' , , , .- , !
- , .
, ., .
-
20th October 2013 22:21 #5
? , , ..
, , , , ...
.. H(5,5) , , , 5 , 5 , elementi=length(H) 5 5 ?
-
20th October 2013 22:37 #6Registered User
Join Date: Oct:2003
Posts: 1,860
.




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in