nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
discretize.hpp
Go to the documentation of this file.
1
3// toolboxes/control/include/nk/control/discretize/discretize.hpp
4//
5// Sample-time conversion: c2d (continuous → discrete) and d2c
6// (discrete → continuous). Returns the same kind of LTI struct as
7// the input (tf in → tf out, ss in → ss out, zpk in → zpk out).
8
9#pragma once
10
11#include <memory_resource>
12#include <nk/value/value.hpp>
13#include <string>
14
15namespace nk::control {
16
19
20
47Value c2d(const Value &sys, double Ts, const std::string &method,
48 std::pmr::memory_resource *mr = nullptr);
49
63Value d2c(const Value &sys, const std::string &method,
64 std::pmr::memory_resource *mr = nullptr);
65
66
68} // namespace nk::control
Core MATLAB-compatible multidimensional array and scalar value type.
Definition value.hpp:61
Value d2c(const Value &sys, const std::string &method, std::pmr::memory_resource *mr=nullptr)
Discrete-to-continuous conversion (d2c(sys, method)).
Value c2d(const Value &sys, double Ts, const std::string &method, std::pmr::memory_resource *mr=nullptr)
Continuous-to-discrete conversion (c2d(sys, Ts, method)).