The constraints in NLPCG are put in matrix form with the first row representing the lower limit so I put the matrix as con={0. 0. 0. 0. 0. 0. 0. 0. 0. 0. . . , . . . . . . . . . . . . , 40. 51. 60. 24. 53. 80. 16. 34. 52. 84. 0. 42.894, 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0. 1. }; put still the resulted variables have negative values as -7.05E-18 so how can I solve this problem. The other thing is that when I generated xs by this way and added to them the outliers(generated as from same distribution with larger value) the the new variables donot have the same correlation determined in the begining so how can I solve this problem? I also need to know how to make a condition so that: if correlation between y and x1 greater than or equal 0.5 x1 belongs to matrix H if correlation between y and x1 less than 0.5 x1 belongs to matrix K Thanks
... View more