help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Skript takes in matlab 6s in Octave never ends


From: Martin Marmsoler
Subject: Re: Skript takes in matlab 6s in Octave never ends
Date: Fri, 8 Mar 2019 09:16:15 +0100

Hi Nicholas,

don't understand why you cannot access the zip file from dropbox.
Plotting is not the problem. Without plotting it looks like below. Here is the output of profexplore:
Was made with fA = 200 (matlab R2018a needs 0.6s).

Top
  main: 1 calls, 4.979 total, 0.403 self
    1) @SystemSimulation/simulate: 1 calls, 2.906 total, 1.522 self
    2) @MahonyComplementaryFilter/update: 4000 calls, 1.289 total, 1.135 self
    3) @MahonyComplementaryFilter/eulerAngles: 4000 calls, 0.325 total, 0.112 self
    4) rad2deg: 4001 calls, 0.040 total, 0.028 self
    5) addpath: 4 calls, 0.013 total, 0.013 self
    6) binary *: 19 calls, 0.001 total, 0.001 self
    7) sin: 3 calls, 0.000 total, 0.000 self
    8) close: 1 calls, 0.000 total, 0.000 self
    9) @SystemSimulation: 1 calls, 0.000 total, 0.000 self
    10) zeros: 4 calls, 0.000 total, 0.000 self
    11) @MahonyComplementaryFilter: 1 calls, 0.000 total, 0.000 self
    12) clear: 1 calls, 0.000 total, 0.000 self
    13) toc: 2 calls, 0.000 total, 0.000 self
    14) clc: 1 calls, 0.000 total, 0.000 self
    15) Evaluation: 1 calls, 0.000 total, 0.000 self
    16) display: 1 calls, 0.000 total, 0.000 self
    17) struct: 1 calls, 0.000 total, 0.000 self
    18) pi: 3 calls, 0.000 total, 0.000 self
    19) ones: 2 calls, 0.000 total, 0.000 self
    20) binary /: 6 calls, 0.000 total, 0.000 self
    21) ceil: 1 calls, 0.000 total, 0.000 self
    22) tic: 1 calls, 0.000 total, 0.000 self

profexplore> 1

Top
  main: 1 calls, 4.979 total, 0.403 self
    @SystemSimulation/simulate: 1 calls, 2.906 total, 1.522 self
      1) @SystemSimulation/rotate_from_earth_to_body_frame: 5778 calls, 1.237 total, 1.088 self
      2) randn: 9880 calls, 0.090 total, 0.090 self
      3) binary +: 29878 calls, 0.018 total, 0.018 self
      4) binary *: 16386 calls, 0.012 total, 0.012 self
      5) binary -: 37833 calls, 0.011 total, 0.011 self
      6) binary .*: 9494 calls, 0.009 total, 0.009 self
      7) binary <: 16000 calls, 0.005 total, 0.005 self
      8) binary >: 10032 calls, 0.002 total, 0.002 self
      9) zeros: 8 calls, 0.000 total, 0.000 self
      10) @SystemSimulation/magentic_field: 1 calls, 0.000 total, 0.000 self
      11) ones: 1 calls, 0.000 total, 0.000 self
      12) length: 1 calls, 0.000 total, 0.000 self
      13) prefix -: 1 calls, 0.000 total, 0.000 self

profexplore> 1

Top
  main: 1 calls, 4.979 total, 0.403 self
    @SystemSimulation/simulate: 1 calls, 2.906 total, 1.522 self
      @SystemSimulation/rotate_from_earth_to_body_frame: 5778 calls, 1.237 total, 1.088 self
        1) sin: 86670 calls, 0.057 total, 0.057 self
        2) cos: 80892 calls, 0.051 total, 0.051 self
        3) binary *: 98226 calls, 0.032 total, 0.032 self
        4) prefix -: 5778 calls, 0.004 total, 0.004 self
        5) binary +: 11556 calls, 0.002 total, 0.002 self
        6) binary -: 11556 calls, 0.002 total, 0.002 self

profexplore>

If you need the zip file, I can send you by email if you like.

Martin

Am Do., 7. März 2019 um 22:42 Uhr schrieb Nicholas Jankowski <address@hidden>:
On Thu, Mar 7, 2019 at 12:17 PM Martin Marmsoler <address@hidden> wrote:
Hello,

I have a script which I wrote in Matlab and tested it in Octave to, but there I saw that the program takes in Octave much longer than in Matlab R2018a. I have some matrix multiplications in some classes and a few loops but don't understand from where the duration difference come.

Here is the skript. If you change fA in line 37 in main.m to a lower value it is a little bit faster because not so many values were used.
In this configuration Matlab needs about 6s to plot the results. Octave is no more able to execute the script (after a few minutes I stoped the simulation).



You say it plots the results?  I can't access dropbox to view the script, but my first question is whether you have tried running it without plotting to see how long the calculation takes.  There have been several cases before where plotting can be severely slowed down for one reason or another. It would be informative if you could try running the script without plotting, or use tic and toc statements to output running time, etc., and report back results to the help list.

nickj

reply via email to

[Prev in Thread] Current Thread [Next in Thread]