The answer from Muli shows how to resolve your problem. Here is the explanation of the compilation failure: the compiler does not know where are the boundaries of how much memory to allocate for each Matrix struct declaration because the dimensions (the values of w and h) are not known at compile time. If the max dimensions of the m array are known at build time, you can use a predefined size struct, like
#define MAX_W 10
#define MAX_H 10
struct {
int w;
int h;
float m[MAX_W][MAX_H];
};
struct matrix my_matrix;
...
afterwards you can declare and use matrix structs as you want.
The drawback of this approach is the cost of allocating more memory than necessary.
Following the linux kernel coding gudelines, I don't fancy typedefs because they tend to make the data definitions opaque: if something is declared elsewhere as the typedefined type, understanding that is a struct is somewhat more complicated.