I'm referring to pandas DataFrame as an example of adding a new ('return') column:
spy['return'] = spy['close'].pct_change()
What's the equivalent in matlab for the line above?
thx
MATLABmatlab financial time series add new column pandas
H=6.31;K=104;M=2208.5;X=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1771,1772,1773,1774,1775,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1867,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000];Y=[21500,21497,21494,21491,21488,21485,21482,21479,21476,21473,21470,21467,21464,21461,21458,21455,21452,21449,21446,21443,21440,21437,21434,21431,21428,21425,21422,21419,21416,21413,21410,21407,21404,21401,21398,21395,21392,21389,21386,21383,21380,21377,21374,21371,21368,21365,21362,21359,21356,21353,21350,21347,21344,21341,21338,21335,21332,21329,21326,21323,21320,21317,21314,21311,21308,21305,21302,21299,21296,21293,21290,21287,21284,21281,21278,21275,21272,21269,21266,21263,21260,21257,21254,21251,21248,21245,21242,21239,21236,21233,21230,21227,21224,21221,21218,21215,21212,21209,21206,21203,21200,21196,21192,21188,21184,21180,21176,21172,21168,21164,21160,21156,21152,21148,21144,21140,21136,21132,21128,21124,21120,21116,21112,21108,21104,21100,21096,21092,21088,21084,21080,21076,21072,21068,21064,21060,21056,21052,21048,21044,21040,21036,21032,21028,21024,21020,21016,21012,21008,21004,21000,20996,20992,20988,20984,20980,20976,20972,20968,20964,20960,20956,20952,20948,20944,20940,20936,20932,20928,20924,20920,20916,20912,20908,20904,20900,20896,20892,20888,20884,20880,20876,20872,20868,20864,20860,20856,20852,20848,20844,20840,20836,20832,20828,20824,20820,20816,20812,20808,20804,20800,20795,20790,20785,20780,20775,20770,20765,20760,20755,20750,20745,20740,20735,20730,20725,20720,20715,20710,20705,20700,20695,20690,20685,20680,20675,20670,20665,20660,20655,20650,20645,20640,20635,20630,20625,20620,20615,20610,20605,20600,20595,20590,20585,20580,20575,20570,20565,20560,20555,20550,20545,20540,20535,20530,20525,20520,20515,20510,20505,20500,20495,20490,20485,20480,20475,20470,20465,20460,20455,20450,20445,20440,20435,20430,20425,20420,20415,20410,20405,20400,20395,20390,20385,20380,20375,20370,20365,20360,20355,20350,20345,20340,20335,20330,20325,20320,20315,20310,20305,20300,20294,20288,20282,20276,20270,20264,20258,20252,20246,20240,20234,20228,20222,20216,20210,20204,20198,20192,20186,20180,20174,20168,20162,20156,20150,20144,20138,20132,20126,20120,20114,20108,20102,20096,20090,20084,20078,20072,20066,20060,20054,20048,20042,20036,20030,20024,20018,20012,20006,20000,19994,19988,19982,19976,19970,19964,19958,19952,19946,19940,19934,19928,19922,19916,19910,19904,19898,19892,19886,19880,19874,19868,19862,19856,19850,19844,19838,19832,19826,19820,19814,19808,19802,19796,19790,19784,19778,19772,19766,19760,19754,19748,19742,19736,19730,19724,19718,19712,19706,19700,19693,19686,19679,19672,19665,19658,19651,19644,19637,19630,19623,19616,19609,19602,19595,19588,19581,19574,19567,19560,19553,19546,19539,19532,19525,19518,19511,19504,19497,19490,19483,19476,19469,19462,19455,19448,19441,19434,19427,19420,19413,19406,19399,19392,19385,19378,19371,19364,19357,19350,19343,19336,19329,19322,19315,19308,19301,19294,19287,19280,19273,19266,19259,19252,19245,19238,19231,19224,19217,19210,19203,19196,19189,19182,19175,19168,19161,19154,19147,19140,19133,19126,19119,19112,19105,19098,19091,19084,19077,19070,19063,19056,19049,19042,19035,19028,19021,19014,19007,19000,18989,18978,18967,18956,18945,18934,18923,18912,18901,18890,18879,18868,18857,18846,18835,18824,18813,18802,18791,18780,18769,18758,18747,18736,18725,18714,18703,18692,18681,18670,18659,18648,18637,18626,18615,18604,18593,18582,18571,18560,18549,18538,18527,18516,18505,18494,18483,18472,18461,18450,18439,18428,18417,18406,18395,18384,18373,18362,18351,18340,18329,18318,18307,18296,18285,18274,18263,18252,18241,18230,18219,18208,18197,18186,18175,18164,18153,18142,18131,18120,18109,18098,18087,18076,18065,18054,18043,18032,18021,18010,17999,17988,17977,17966,17955,17944,17933,17922,17911,17900,17889,17878,17867,17856,17845,17834,17823,17812,17801,17790,17779,17768,17757,17746,17735,17724,17713,17702,17691,17680,17669,17658,17647,17636,17625,17614,17603,17592,17581,17570,17559,17548,17537,17526,17515,17504,17493,17482,17471,17460,17449,17438,17427,17416,17405,17394,17383,17372,17361,17350,17339,17328,17317,17306,17295,17284,17273,17262,17251,17240,17229,17218,17207,17196,17185,17174,17163,17152,17141,17130,17119,17108,17097,17086,17075,17064,17053,17042,17031,17020,17009,16998,16987,16976,16965,16954,16943,16932,16921,16910,16899,16888,16877,16866,16855,16844,16833,16822,16811,16800,16789,16778,16767,16756,16745,16734,16723,16712,16701,16690,16679,16668,16657,16646,16635,16624,16613,16602,16591,16580,16569,16558,16547,16536,16525,16514,16503,16492,16481,16470,16459,16448,16437,16426,16415,16404,16393,16382,16371,16360,16349,16338,16327,16316,16305,16294,16283,16272,16261,16250,16243,16236,16229,16222,16215,16208,16201,16194,16187,16180,16173,16166,16159,16152,16145,16138,16131,16124,16117,16110,16103,16096,16089,16082,16075,16068,16061,16054,16047,16040,16033,16026,16019,16012,16005,15998,15991,15984,15977,15970,15963,15956,15949,15942,15935,15928,15921,15914,15907,15900,15893,15886,15879,15872,15865,15858,15851,15844,15837,15830,15823,15816,15809,15802,15795,15788,15781,15774,15767,15760,15753,15746,15739,15732,15725,15718,15711,15704,15697,15690,15683,15676,15669,15662,15655,15648,15641,15634,15627,15620,15613,15606,15599,15592,15585,15578,15571,15564,15557,15550,15543,15536,15529,15522,15515,15508,15501,15494,15487,15480,15473,15466,15459,15452,15445,15438,15431,15424,15417,15410,15403,15396,15389,15382,15375,15368,15361,15354,15347,15340,15333,15326,15319,15312,15305,15298,15291,15284,15277,15270,15263,15256,15249,15242,15235,15228,15221,15214,15207,15200,15193,15186,15179,15172,15165,15158,15151,15144,15137,15130,15123,15116,15109,15102,15095,15088,15081,15074,15067,15060,15053,15046,15039,15032,15025,15018,15011,15004,14997,14990,14983,14976,14969,14962,14955,14948,14941,14934,14927,14920,14913,14906,14899,14892,14885,14878,14871,14864,14857,14850,14843,14836,14829,14822,14815,14808,14801,14794,14787,14780,14773,14766,14759,14752,14745,14738,14731,14724,14717,14710,14703,14696,14689,14682,14675,14668,14661,14654,14647,14640,14633,14626,14619,14612,14605,14598,14591,14584,14577,14570,14563,14556,14549,14542,14535,14528,14521,14514,14507,14500,14494,14488,14482,14476,14470,14464,14458,14452,14446,14440,14434,14428,14422,14416,14410,14404,14398,14392,14386,14380,14374,14368,14362,14356,14350,14344,14338,14332,14326,14320,14314,14308,14302,14296,14290,14284,14278,14272,14266,14260,14254,14248,14242,14236,14230,14224,14218,14212,14206,14200,14194,14188,14182,14176,14170,14164,14158,14152,14146,14140,14134,14128,14122,14116,14110,14104,14098,14092,14086,14080,14074,14068,14062,14056,14050,14044,14038,14032,14026,14020,14014,14008,14002,13996,13990,13984,13978,13972,13966,13960,13954,13948,13942,13936,13930,13924,13918,13912,13906,13900,13894,13888,13882,13876,13870,13864,13858,13852,13846,13840,13834,13828,13822,13816,13810,13804,13798,13792,13786,13780,13774,13768,13762,13756,13750,13744,13738,13732,13726,13720,13714,13708,13702,13696,13690,13684,13678,13672,13666,13660,13654,13648,13642,13636,13630,13624,13618,13612,13606,13600,13594,13588,13582,13576,13570,13564,13558,13552,13546,13540,13534,13528,13522,13516,13510,13504,13498,13492,13486,13480,13474,13468,13462,13456,13450,13444,13438,13432,13426,13420,13414,13408,13402,13396,13390,13384,13378,13372,13366,13360,13354,13348,13342,13336,13330,13324,13318,13312,13306,13300,13294,13288,13282,13276,13270,13264,13258,13252,13246,13240,13234,13228,13222,13216,13210,13204,13198,13192,13186,13180,13174,13168,13162,13156,13150,13144,13138,13132,13126,13120,13114,13108,13102,13096,13090,13084,13078,13072,13066,13060,13054,13048,13042,13036,13030,13024,13018,13012,13006,13000,12995,12990,12985,12980,12975,12970,12965,12960,12955,12950,12945,12940,12935,12930,12925,12920,12915,12910,12905,12900,12895,12890,12885,12880,12875,12870,12865,12860,12855,12850,12845,12840,12835,12830,12825,12820,12815,12810,12805,12800,12795,12790,12785,12780,12775,12770,12765,12760,12755,12750,12745,12740,12735,12730,12725,12720,12715,12710,12705,12700,12695,12690,12685,12680,12675,12670,12665,12660,12655,12650,12645,12640,12635,12630,12625,12620,12615,12610,12605,12600,12595,12590,12585,12580,12575,12570,12565,12560,12555,12550,12545,12540,12535,12530,12525,12520,12515,12510,12505,12500,12495,12490,12485,12480,12475,12470,12465,12460,12455,12450,12445,12440,12435,12430,12425,12420,12415,12410,12405,12400,12395,12390,12385,12380,12375,12370,12365,12360,12355,12350,12345,12340,12335,12330,12325,12320,12315,12310,12305,12300,12295,12290,12285,12280,12275,12270,12265,12260,12255,12250,12245,12240,12235,12230,12225,12220,12215,12210,12205,12200,12195,12190,12185,12180,12175,12170,12165,12160,12155,12150,12145,12140,12135,12130,12125,12120,12115,12110,12105,12100,12095,12090,12085,12080,12075,12070,12065,12060,12055,12050,12045,12040,12035,12030,12025,12020,12015,12010,12005,12000,11995,11990,11985,11980,11975,11970,11965,11960,11955,11950,11945,11940,11935,11930,11925,11920,11915,11910,11905,11900,11895,11890,11885,11880,11875,11870,11865,11860,11855,11850,11845,11840,11835,11830,11825,11820,11815,11810,11805,11800,11795,11790,11785,11780,11775,11770,11765,11760,11755,11750,11746,11742,11738,11734,11730,11726,11722,11718,11714,11710,11706,11702,11698,11694,11690,11686,11682,11678,11674,11670,11666,11662,11658,11654,11650,11646,11642,11638,11634,11630,11626,11622,11618,11614,11610,11606,11602,11598,11594,11590,11586,11582,11578,11574,11570,11566,11562,11558,11554,11550,11546,11542,11538,11534,11530,11526,11522,11518,11514,11510,11506,11502,11498,11494,11490,11486,11482,11478,11474,11470,11466,11462,11458,11454,11450,11446,11442,11438,11434,11430,11426,11422,11418,11414,11410,11406,11402,11398,11394,11390,11386,11382,11378,11374,11370,11366,11362,11358,11354,11350,11346,11342,11338,11334,11330,11326,11322,11318,11314,11310,11306,11302,11298,11294,11290,11286,11282,11278,11274,11270,11266,11262,11258,11254,11250,11246,11242,11238,11234,11230,11226,11222,11218,11214,11210,11206,11202,11198,11194,11190,11186,11182,11178,11174,11170,11166,11162,11158,11154,11150,11146,11142,11138,11134,11130,11126,11122,11118,11114,11110,11106,11102,11098,11094,11090,11086,11082,11078,11074,11070,11066,11062,11058,11054,11050,11046,11042,11038,11034,11030,11026,11022,11018,11014,11010,11006,11002,10998,10994,10990,10986,10982,10978,10974,10970,10966,10962,10958,10954,10950,10946,10942,10938,10934,10930,10926,10922,10918,10914,10910,10906,10902,10898,10894,10890,10886,10882,10878,10874,10870,10866,10862,10858,10854,10850,10846,10842,10838,10834,10830,10826,10822,10818,10814,10810,10806,10802,10798,10794,10790,10786,10782,10778,10774,10770,10766,10762,10758,10754,10750,10747,10744,10741,10738,10735,10732,10729,10726,10723,10720,10717,10714,10711,10708,10705,10702,10699,10696,10693,10690,10687,10684,10681,10678,10675,10672,10669,10666,10663,10660,10657,10654,10651,10648,10645,10642,10639,10636,10633,10630,10627,10624,10621,10618,10615,10612,10609,10606,10603,10600,10597,10594,10591,10588,10585,10582,10579,10576,10573,10570,10567,10564,10561,10558,10555,10552,10549,10546,10543,10540,10537,10534,10531,10528,10525,10522,10519,10516,10513,10510,10507,10504,10501,10498,10495,10492,10489,10486,10483,10480,10477,10474,10471,10468,10465,10462,10459,10456,10453,10450,10447,10444,10441,10438,10435,10432,10429,10426,10423,10420,10417,10414,10411,10408,10405,10402,10399,10396,10393,10390,10387,10384,10381,10378,10375,10372,10369,10366,10363,10360,10357,10354,10351,10348,10345,10342,10339,10336,10333,10330,10327,10324,10321,10318,10315,10312,10309,10306,10303,10300,10297,10294,10291,10288,10285,10282,10279,10276,10273,10270,10267,10264,10261,10258,10255,10252,10249,10246,10243,10240,10237,10234,10231,10228,10225,10222,10219,10216,10213,10210,10207,10204,10201,10198,10195,10192,10189,10186,10183,10180,10177,10174,10171,10168,10165,10162,10159,10156,10153,10150,10147,10144,10141,10138,10135,10132,10129,10126,10123,10120,10117,10114,10111,10108,10105,10102,10099,10096,10093,10090,10087,10084,10081,10078,10075,10072,10069,10066,10063,10060,10057,10054,10051,10048,10045,10042,10039,10036,10033,10030,10027,10024,10021,10018,10015,10012,10009,10006,10003,10000];Z=1:1:2001;for n=1:1:2001 if(n+K>2000) Z(n)=0; else if(Y(n+K)/10>=M) Z(n)=0; else Z(n)=floor(((Y(n+K))*H)/(M-(Y(n+K))/10)); end end% fprintf('%d\n',Z(n))
endfigureplot3(X,Y,Z)grid on
dt.times=[];
Best Answer