{"action":"created","issue":{"url":"https://api.github.com/repos/chebfun/chebfun/issues/1440","labels_url":"https://api.github.com/repos/chebfun/chebfun/issues/1440/labels{/name}","comments_url":"https://api.github.com/repos/chebfun/chebfun/issues/1440/comments","events_url":"https://api.github.com/repos/chebfun/chebfun/issues/1440/events","html_url":"https://github.com/chebfun/chebfun/issues/1440","id":65662206,"number":1440,"title":"Trigfun `cumsum`","user":{"login":"jaurentz","id":7694954,"avatar_url":"https://avatars.githubusercontent.com/u/7694954?v=3","gravatar_id":"","url":"https://api.github.com/users/jaurentz","html_url":"https://github.com/jaurentz","followers_url":"https://api.github.com/users/jaurentz/followers","following_url":"https://api.github.com/users/jaurentz/following{/other_user}","gists_url":"https://api.github.com/users/jaurentz/gists{/gist_id}","starred_url":"https://api.github.com/users/jaurentz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaurentz/subscriptions","organizations_url":"https://api.github.com/users/jaurentz/orgs","repos_url":"https://api.github.com/users/jaurentz/repos","events_url":"https://api.github.com/users/jaurentz/events{/privacy}","received_events_url":"https://api.github.com/users/jaurentz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chebfun/chebfun/labels/epslevel-constructor","name":"epslevel-constructor","color":"009800"},{"url":"https://api.github.com/repos/chebfun/chebfun/labels/periodic","name":"periodic","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-01T11:19:41Z","updated_at":"2015-04-07T15:13:29Z","closed_at":null,"body":"In the current version of Chebfun the trigtech/cumsum command throws an error if the function\r\nhas a nonzero mean. The line between zero and nonzero mean can be difficult to determine. \r\nConsider the following example:\r\n```matlab\r\n >> f = chebfun([1;0;1],[-1,1],'coeffs','trig'); cumsum(f)    \r\n\r\nans =\r\n\r\n   chebfun column (1 smooth piece)\r\n       interval       length   endpoint values trig\r\n[      -1,       1]        3  -1.6e-16        0 \r\nEpslevel = 2.220446e-16.  Vscale = 5.513289e-01.\r\n\r\n>> g = chebfun([1;1e-14;1],[-1,1],'coeffs','trig'); cumsum(g)\r\nError using trigtech/cumsum>cumsumContinuousDim (line 84)\r\nIndefinite integrals are only possible for TRIGTECH objects with zero mean.\r\n\r\nError in trigtech/cumsum (line 64)\r\n    f = cumsumContinuousDim(f, m);\r\n\r\nError in bndfun/cumsum (line 29)\r\n    g = cumsum(f.onefun);\r\n\r\n\r\nError in chebfun/cumsum>cumsumContinousDim (line 85)\r\n        newFuns = cumsum(f.funs{j});\r\n\r\nError in chebfun/cumsum (line 51)\r\n        f(k) = cumsumContinousDim(f(k), m);\r\n```\r\nEven in this simple example it is not clear what to do. One option might be to\r\nreturn a chebfun instead of an error."},"comment":{"url":"https://api.github.com/repos/chebfun/chebfun/issues/comments/90603521","html_url":"https://github.com/chebfun/chebfun/issues/1440#issuecomment-90603521","issue_url":"https://api.github.com/repos/chebfun/chebfun/issues/1440","id":90603521,"user":{"login":"jaurentz","id":7694954,"avatar_url":"https://avatars.githubusercontent.com/u/7694954?v=3","gravatar_id":"","url":"https://api.github.com/users/jaurentz","html_url":"https://github.com/jaurentz","followers_url":"https://api.github.com/users/jaurentz/followers","following_url":"https://api.github.com/users/jaurentz/following{/other_user}","gists_url":"https://api.github.com/users/jaurentz/gists{/gist_id}","starred_url":"https://api.github.com/users/jaurentz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaurentz/subscriptions","organizations_url":"https://api.github.com/users/jaurentz/orgs","repos_url":"https://api.github.com/users/jaurentz/repos","events_url":"https://api.github.com/users/jaurentz/events{/privacy}","received_events_url":"https://api.github.com/users/jaurentz/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T15:13:28Z","updated_at":"2015-04-07T15:13:28Z","body":"In the branch `feature-prescribed-eps` some tests for `trigtech/cumsum.m` have been disabled due to\r\nan epslevel-dependent issue. Please reinstate these tests when the issue is resolved."}}