In this i have to do following operation mentioned:
Here value of a,b,z are changing continuously. For every value program will calculate value of 'y'.
It will become three dimensional array.
For entire these iterations i have to find out maximum value of 'y' and corresponding value of 'a' & 'b'.
I am facing one more problem, when i formulated array it was showing lot more zeros.
for p=1:6 a=2*p; for q=1:6 b=5*q;
for z=1:100 k=z*z; x=k*4+1; y=a*x+b*k+1; y(p,q,z)=y;
end end end
No products are associated with this question.
max1 = [-inf 0 0 0]; for p=1:6 for q=1:6 for z=1:100 a=2*p; b=5*q; k=z*z; x=k*4+1; k1 = a*x+b*k+1; y(p,q,z) = k1; if k1 > max1(1), max1 = [k1,p,q,z]; end end end end