I have a couple of files .mat-files named "K1.mat", "K2.mat" etc. Each file contains a matrix called K of the same size.
What I would like to do is load K from each file as "K1", "K2" etc. and assemble them into a bigger matrix K = [K1; K2; ...; Kn]. But I cannot seem to find a way to load the K-matrix from the K(i).mat-files the way I'd like to. Using the load() command matlab loads the matrix as "K", but I'd like to load it and directly assign it to the variable "K1", "K2" etc. I suppose I could do this by loading K and do something like K(i) = K, but this seems unnecessarily complex. Is there an easier way to do this?