Code covered by the BSD License

# Optimization in MATLAB: An Introduction to Quadratic Programming

### Seth DeLand (view profile)

26 Mar 2012 (Updated )

Files used in "An Introduction to Quadratic Programming" Webinar

```function gradObj = grad(in1)
%
% Copyright (c) 2012, MathWorks, Inc.
%
%    This function was generated by the Symbolic Math Toolbox version 5.9.
%    12-Sep-2012 14:27:23

x1 = in1(1,:);
x2 = in1(2,:);
x3 = in1(3,:);
x4 = in1(4,:);
x5 = in1(5,:);
x6 = in1(6,:);
x7 = in1(7,:);
x8 = in1(8,:);
x9 = in1(9,:);
x10 = in1(10,:);
x11 = in1(11,:);
x12 = in1(12,:);
x13 = in1(13,:);
x14 = in1(14,:);
x15 = in1(15,:);
x16 = in1(16,:);
x17 = in1(17,:);
x18 = in1(18,:);
x19 = in1(19,:);
x20 = in1(20,:);
x21 = in1(21,:);
x22 = in1(22,:);
x23 = in1(23,:);
x24 = in1(24,:);
x25 = in1(25,:);
x26 = in1(26,:);
x27 = in1(27,:);
x28 = in1(28,:);
x29 = in1(29,:);
x30 = in1(30,:);
x31 = in1(31,:);
x32 = in1(32,:);
x33 = in1(33,:);
x34 = in1(34,:);
x35 = in1(35,:);
x36 = in1(36,:);
x37 = in1(37,:);
x38 = in1(38,:);
x39 = in1(39,:);
x40 = in1(40,:);
x41 = in1(41,:);
x42 = in1(42,:);
x43 = in1(43,:);
x44 = in1(44,:);
x45 = in1(45,:);
x46 = in1(46,:);
x47 = in1(47,:);
x48 = in1(48,:);
x49 = in1(49,:);
x50 = in1(50,:);
x51 = in1(51,:);
x52 = in1(52,:);
x53 = in1(53,:);
x54 = in1(54,:);
x55 = in1(55,:);
x56 = in1(56,:);
x57 = in1(57,:);
x58 = in1(58,:);
x59 = in1(59,:);
x60 = in1(60,:);
x61 = in1(61,:);
x62 = in1(62,:);
x63 = in1(63,:);
x64 = in1(64,:);
x65 = in1(65,:);
x66 = in1(66,:);
x67 = in1(67,:);
x68 = in1(68,:);
x69 = in1(69,:);
x70 = in1(70,:);
x71 = in1(71,:);
x72 = in1(72,:);
x73 = in1(73,:);
x74 = in1(74,:);
x75 = in1(75,:);
x76 = in1(76,:);
x77 = in1(77,:);
x78 = in1(78,:);
x79 = in1(79,:);
x80 = in1(80,:);
x81 = in1(81,:);
x82 = in1(82,:);
x83 = in1(83,:);
x84 = in1(84,:);
x85 = in1(85,:);
x86 = in1(86,:);
x87 = in1(87,:);
x88 = in1(88,:);
x89 = in1(89,:);
x90 = in1(90,:);
x91 = in1(91,:);
x92 = in1(92,:);
x93 = in1(93,:);
x94 = in1(94,:);
x95 = in1(95,:);
x96 = in1(96,:);
x97 = in1(97,:);
x98 = in1(98,:);
x99 = in1(99,:);
x100 = in1(100,:);
t2 = x2.*1.069191218087742e-7;
t3 = x3.*1.049112337996364e-7;
t4 = x4.*1.033288501407655e-7;
t5 = x5.*1.043238045134971e-7;
t6 = x6.*1.063284284702376e-7;
t7 = x7.*1.100575316516114e-7;
t8 = x8.*1.136630325073594e-7;
t9 = x9.*1.169711460809911e-7;
t10 = x10.*1.206562687519399e-7;
t11 = x11.*1.229199056514719e-7;
t12 = x12.*1.2385232118985e-7;
t13 = x13.*1.223070862010022e-7;
t14 = x14.*1.197031419959453e-7;
t15 = x15.*1.16863397113715e-7;
t16 = x16.*1.158521643398014e-7;
t17 = x17.*1.176597074120921e-7;
t18 = x18.*1.242452151180728e-7;
t19 = x19.*1.254622629195342e-7;
t20 = x20.*1.227803703485394e-7;
t21 = x21.*1.18858395082148e-7;
t22 = x22.*1.146528816134004e-7;
t23 = x23.*1.07449467273562e-7;
t24 = x24.*9.988246412062672e-8;
t25 = x25.*9.442378754158177e-8;
t26 = x26.*9.124006484843349e-8;
t27 = x27.*9.000974172924441e-8;
t28 = x28.*8.989903267168271e-8;
t29 = x29.*9.105200279783388e-8;
t30 = x30.*9.585602172152558e-8;
t31 = x31.*1.020739986706656e-7;
t32 = x32.*1.093960318283442e-7;
t33 = x33.*1.145166837239499e-7;
t34 = x34.*1.157743175605512e-7;
t35 = x35.*1.163883681860425e-7;
t36 = x36.*1.16396040673056e-7;
t37 = x37.*1.162009860801403e-7;
t38 = x38.*1.158002440167045e-7;
t39 = x39.*1.146399451979801e-7;
t40 = x40.*1.1277291412125e-7;
t41 = x41.*1.165608973795953e-7;
t42 = x42.*1.271674624544107e-7;
t43 = x43.*1.325956053316882e-7;
t44 = x44.*1.310331923995703e-7;
t45 = x45.*1.292736224584223e-7;
t46 = x46.*1.263980669621752e-7;
t47 = x47.*1.202058797559382e-7;
t48 = x48.*1.129671559411329e-7;
t49 = x49.*1.08714799455648e-7;
t50 = x50.*1.071406420802653e-7;