In a data statement * is not the same as ,: , is a separator, but * is a repeat count specifier.
The example of the question
character*2 k(31,12)
data k/350*' '/
has the initialization value equal to 700 blanks and k is a rank-2 array (of shape [31,12]) of length-2 characters.
Ideally, the size of k would be identical to the size of the initialization value expression but there is a difference: 744, and 700. Let's just assume that the intention is that each element of the array k has value ' ' (ie., all blanks).
As to the best way of doing that in MATLAB, I'm no expert. But if necessary I'll add a way (or someone else can). Hopefully the explanation of what the Fortan code is (intended to do/) doing is sufficient.
350as a number thenk={350, [] }. If you want to enter350as a string thenk={'350',[]}mathworks.com/help/matlab/getting-started-with-matlab.html - Sardar Usama