~ubuntu-branches/ubuntu/wily/octave/wily-proposed

« back to all changes in this revision

Viewing changes to examples/standalonebuiltin.cc

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot
  • Date: 2014-03-10 17:32:29 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20140310173229-000oj77i9m6tjpvd
Tags: 3.8.1-1
* Imported Upstream version 3.8.1
  + libgui/src/main-window.cc: Fix problems with gui startup and focus issues
    (Closes: #738672)
  + scripts/pkg/private/fix_depends.m: Fix installing packages where
    dependency name contains '-' (Closes: #740984)
* debian/copyright: reflect upstream changes.
* octave.postinst: remove workaround for #681064 (package dir re-creation).
  (Closes: #681461)
* Remove patches applied upstream:
  + doc-compressed-info.diff
  + kfreebsd_tcgetattr.diff
  + octave-cli-manpage.diff
  + save-uint8-in-text-format.diff
* mkoctfile is now an executable binary instead of a shell script.
  + mkoctfile-mpi.diff: adapt for new format of mkoctfile.
  + d/control: add shlibs:Depends to liboctave-dev.
* Fix statement about the GUI in NEWS.Debian.
* debian/control: don't mention the FAQ in descriptions, it has been removed.
* Adapt to the fact that JIT is now disabled by default in ./configure script.
* Disable JIT on hurd-i386, LLVM not available there.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
int
6
6
main (void)
7
7
{
8
 
 
9
8
  int n = 2;
10
9
  Matrix a_matrix = Matrix (n, n);
11
10
 
13
12
    for (octave_idx_type j = 0; j < n; j++)
14
13
      a_matrix(i,j) = (i + 1) * 10 + (j + 1);
15
14
 
16
 
  std::cout << "This is a matrix:" 
17
 
            << std::endl 
18
 
            << a_matrix
19
 
            << std::endl;
 
15
  std::cout << "This is a matrix:" << std::endl 
 
16
            << a_matrix            << std::endl;
20
17
 
21
18
  octave_value_list in;
22
19
  in(0) = a_matrix;
24
21
  octave_value_list out = Fnorm (in, 1);
25
22
  double norm_of_the_matrix = out(0).double_value ();
26
23
 
27
 
  std::cout << "This is the norm of the matrix:" 
28
 
            << std::endl 
29
 
            << norm_of_the_matrix
30
 
            << std::endl;
 
24
  std::cout << "This is the norm of the matrix:" << std::endl 
 
25
            << norm_of_the_matrix                << std::endl;
31
26
  
32
27
  return 0;
33
28
}