Hi I have got this optimization problem and I don´t now how itsolve the problem: A=[
548 |
555 |
548 |
554 |
558 |
559 |
552 |
553 |
556 |
561 |
556 |
560 |
565 |
568 |
565 |
566 |
565 |
572 |
564 |
571 |
558 |
559 |
552 |
100 |
555 |
548 |
100 |
100 |
568 |
565 |
566 |
100 |
565 |
568 |
565 |
566 |
565 |
572 |
564 |
571 |
558 |
559 |
552 |
100 |
548 |
554 |
558 |
559 |
552 |
553 |
555 |
548 |
556 |
560 |
568 |
565 |
565 |
566 |
565 |
568 |
564 |
571 |
565 |
572 |
552 |
100 |
558 |
559 |
100 |
100 |
556 |
560 |
566 |
100 |
565 |
566 | ] I have got: "A" whose size is N,M k=1 I create a new matrix from A called H for i=(k+1):N H(i-k,1)=A(i+k,1)-A(i,3); end
So H is sized [(N-1-k),1] %H tries to obtain the rest of the next k element of the column 1 of the matrix A, minus the i element of matrtix A column 3 At the other side, I have P who is a zeros and 1 ones vector Whith P is always sized [N-1,1] Z=H.*P((k+1):end,1); I wanto to make two optimitations: 1. Find the minimum k so that all the elements of Z will be >=0. Other program: 2.It will be posible that there is no k that makes all Z components >=0 so I want to find the k that makes sum(Z) the maximun. Adittionaly in another version of the program I want to find k between 2:8 that make sum(Z) maximum. In solver excel I have achieved but I´m not able to make it in octave. Can you again help me one more time. Thanks for all in advance and Best regards. If you can´t help me will you be able to send me documentation to be able to do it.?
Express yourself instantly with MSN Messenger! MSN Messenger
Express yourself instantly with MSN Messenger! MSN Messenger
|