# Generate structured problem matrices

**URL:** <https://discourse.julialang.org/t/generate-structured-problem-matrices/62688>\
**Category:** Modelling & Simulations\
**Tags:** linearalgebra, benchmark\
**Created:** [June 10, 2021, 4:51pm UTC](https://discourse.julialang.org/t/generate-structured-problem-matrices/62688 "2021-06-10T16:51:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthiasbe](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@matthiasbe](https://discourse.julialang.org/u/matthiasbe)\
**Post date:** [June 10, 2021, 4:51pm UTC](https://discourse.julialang.org/t/generate-structured-problem-matrices/62688/1 "2021-06-10T16:51:33Z")

</div>

Hello,

I am studying the low rank approximations of matrices, for example by truncated the Singular Value Decomposition of a matrix.

In order to test any algorithm, I need some test matrices that have internal structure, for example coming from modelisation of a physical problem (e.g. diffusion problem). Indeed, I have experienced that these matrices tend to be good candidates (or very bad) for matrix approximation.

Is there a project out there that enables to generate matrices from real life problems ?

Thank you for any information.

---

<div class="post-metadata">

**Author:** ![PeterSimon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petersimon/32/25193_2.png) [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Post date:** [June 10, 2021, 11:07pm UTC](https://discourse.julialang.org/t/generate-structured-problem-matrices/62688/2 "2021-06-10T23:07:04Z")

</div>

In the unit tests for [PSSFSS](https://github.com/simonp0420/PSSFSS.jl) there there is a test beginning [here](https://github.com/simonp0420/PSSFSS.jl/blob/afb0e6eaa722c8ab9e0fe493cfdfe19218a1d39b/test/FillZY_test.jl#L19) that computes the so-called “generalized impedance matrix” `zmat` for a rectangular frequency selective surface. This dense, square matrix of order 1160 results from applying the “method of moments” (a boundary integral formulation) and has structure reflecting the translational invariance of the Green’s function used in its construction. You can adjust the order of the matrix by adjusting the parameters `Nx` and/or `Ny`.
