comparison scripts/optimization/fsolve.m @ 21568:3d60ed163b70

maint: Eliminate bad spacing around '='. * Figure.h, PopupMenuControl.cc, annotation-dialog.cc, gl-select.h, files-dock-widget.cc, find-files-dialog.cc, history-dock-widget.cc, file-editor.cc, main-window.cc, webinfo.cc, resource-manager.cc, shortcut-manager.cc, workspace-view.cc, __ichol__.cc, __ilu__.cc, __lin_interpn__.cc, bitfcns.cc, debug.cc, filter.cc, ft-text-renderer.cc, graphics.cc, graphics.in.h, hex2num.cc, jit-typeinfo.cc, load-save.cc, ls-mat5.cc, mxarray.in.h, oct-stream.cc, pr-output.cc, variables.cc, __init_fltk__.cc, __magick_read__.cc, chol.cc, ov-struct.cc, op-scm-cs.cc, pt-assign.cc, CollocWt.cc, randpoisson.c, inputParser.m, quadgk.m, waitbar.m, imwrite.m, __imread__.m, textread.m, fileattrib.m, __xzip__.m, what.m, fsolve.m, fix_depends.m, stemleaf.m, bicgstab.m, ichol.m, io.tst: maint: Eliminate bad spacing around '='.
author Rik <rik@octave.org>
date Wed, 30 Mar 2016 22:09:26 -0700
parents f7f97d7e9294
children 683a1beee538
comparison
equal deleted inserted replaced
21567:3d25f9f4a62b 21568:3d60ed163b70
557 %! noise = 1e-5 * sin (100*x); 557 %! noise = 1e-5 * sin (100*x);
558 %! y = exp (-a0*x) + b0 + noise; 558 %! y = exp (-a0*x) + b0 + noise;
559 %! c_opt = [a0, b0]; 559 %! c_opt = [a0, b0];
560 %! tol = 1e-5; 560 %! tol = 1e-5;
561 %! 561 %!
562 %! [c, fval, info, output] = fsolve (@(c) (exp(-c(1)*x) + c(2) - y), [0, 0]); 562 %! [c, fval, info, output] = fsolve (@(c) (exp(-c(1)*x) + c(2) - y), [0, 0]);
563 %! assert (info > 0); 563 %! assert (info > 0);
564 %! assert (norm (c - c_opt, Inf) < tol); 564 %! assert (norm (c - c_opt, Inf) < tol);
565 %! assert (norm (fval) < norm (noise)); 565 %! assert (norm (fval) < norm (noise));
566 566
567 %!function y = cfun (x) 567 %!function y = cfun (x)