mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-04-11 19:30:46 +01:00
improvement of matrix example
This commit is contained in:
parent
6f474ede7b
commit
9484934a8a
@ -1,6 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <latan/Io.hpp>
|
||||
#include <latan/Mat.hpp>
|
||||
#include <latan/Math.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace Latan;
|
||||
@ -19,12 +20,13 @@ int main(void)
|
||||
cout << "A=\n" << A << '\n' << endl;
|
||||
cout << "B=\n" << B << '\n' << endl;
|
||||
cout << "A*B=\n" << A*B << '\n' << endl;
|
||||
cout << "cos(A)=\n" << A.unaryExpr(StdMath::cos) << '\n' << endl;
|
||||
F.close();
|
||||
|
||||
// write
|
||||
cout << "-- saving A*B..." << endl;
|
||||
F.open(fileName, File::Mode::append);
|
||||
F.save((A*B).eval(), "AB");
|
||||
F.save(A*B, "AB");
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user