Results 1 to 2 of 2

Thread: display octave solution

  1. #1
    Join Date
    May 2011
    Beans
    1

    display octave solution

    Hi,

    I used octave to calculate the solutions for an equation system.
    However, I want it to only print the first solution while printing the second one after displaying a message. Unfortunately, I can only get it to display both solutions at the same time (using disp() or num2str).

  2. #2
    Join Date
    Nov 2008
    Location
    new haven, ct, u.s.
    Beans
    10
    Distro
    Ubuntu Development Release

    Re: display octave solution

    The exact syntax will depend on how the solution is stored as a variable. But something analogous to
    Code:
    fprintf ('%f\nMessage\n%f\n', x(1), x(2));
    ought to do what you want.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •