mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-11-18 21:49:30 +00:00
Compare commits
2 Commits
e4861e7b50
...
b0782552d1
| Author | SHA1 | Date | |
|---|---|---|---|
| b0782552d1 | |||
| fef0f3704c |
@@ -511,6 +511,27 @@ PlotImpulses::PlotImpulses(const DVec &x, const DVec &y)
|
|||||||
setCommand("'" + tmpFileName + "' u 1:2 w impulses");
|
setCommand("'" + tmpFileName + "' u 1:2 w impulses");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PlotSteps constructor ////////////////////////////////////////////////////
|
||||||
|
PlotSteps::PlotSteps(const DVec &x, const DVec &y)
|
||||||
|
{
|
||||||
|
if (x.rows() != y.rows())
|
||||||
|
{
|
||||||
|
LATAN_ERROR(Size, "x and y vector does not have the same size");
|
||||||
|
}
|
||||||
|
|
||||||
|
DMat d(x.rows(), 2);
|
||||||
|
string tmpFileName;
|
||||||
|
|
||||||
|
for (Index i = 0; i < x.rows(); ++i)
|
||||||
|
{
|
||||||
|
d(i, 0) = x(i);
|
||||||
|
d(i, 1) = y(i);
|
||||||
|
}
|
||||||
|
tmpFileName = dumpToTmpFile(d);
|
||||||
|
pushTmpFile(tmpFileName);
|
||||||
|
setCommand("'" + tmpFileName + "' u 1:2 w steps");
|
||||||
|
}
|
||||||
|
|
||||||
// PlotGrid constructor ////////////////////////////////////////////////////////
|
// PlotGrid constructor ////////////////////////////////////////////////////////
|
||||||
PlotGrid::PlotGrid(const DVec &x, const DVec &y, const DMat &value)
|
PlotGrid::PlotGrid(const DVec &x, const DVec &y, const DMat &value)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -191,6 +191,15 @@ public:
|
|||||||
virtual ~PlotHistogram(void) = default;
|
virtual ~PlotHistogram(void) = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class PlotSteps: public PlotObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// constructor
|
||||||
|
PlotSteps(const DVec &x, const DVec &y);
|
||||||
|
// destructor
|
||||||
|
virtual ~PlotSteps(void) = default;
|
||||||
|
};
|
||||||
|
|
||||||
class PlotImpulses: public PlotObject
|
class PlotImpulses: public PlotObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ void filterConvolution(MatType &out, const MatType &data,
|
|||||||
{
|
{
|
||||||
Index n = data.rows(), nf = n*filter.size();
|
Index n = data.rows(), nf = n*filter.size();
|
||||||
|
|
||||||
|
if (&out == &data)
|
||||||
|
{
|
||||||
|
LATAN_ERROR(Argument, "filter convolution does not support in-place operation");
|
||||||
|
}
|
||||||
out.resizeLike(data);
|
out.resizeLike(data);
|
||||||
out.fill(0.);
|
out.fill(0.);
|
||||||
for (unsigned int i = 0; i < filter.size(); ++i)
|
for (unsigned int i = 0; i < filter.size(); ++i)
|
||||||
|
|||||||
Reference in New Issue
Block a user