Last active
December 27, 2015 19:19
-
-
Save thorade/7376152 to your computer and use it in GitHub Desktop.
emulate Matlabs logspace function in Modelica
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function logspace | |
input Real a; | |
input Real b; | |
input Integer n; | |
output Real[n] y; | |
protected | |
Real[n] lin= linspace(a,b,n); | |
algorithm | |
y := {10^lin[i] for i in 1:n}; | |
end logspace; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment