help-octave
[Top][All Lists]
Advanced

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

Skript takes much longer in Octave than in Matlab


From: Martin Marmsoler
Subject: Skript takes much longer in Octave than in Matlab
Date: Mon, 25 Mar 2019 08:43:23 +0100

Hi,

sorry that I'm asking again, but on the last mail I didn't get a response.

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.

https://www.dropbox.com/s/xlj2jftssykuirx/KalmanFilterAttitudeEstimation.zip?dl=0

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>

Martin

reply via email to

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