@printf being a macro, it does not accept a format string that has been passed as a variable.
myvec = randn(4) n = length(myvec) outstring = "Beginning of string with some numbers: " for i = 1:n outstring = outstring*"%-12.3g" end outstring = outstring*"\n" @printf(outstring, myvec...)
Is there currently a way to print using format strings without using a macro, or maybe a much smarter way I have failed to understand? The solution provided in
Changes the output for all
Float64 which is undesirable in my case.
Thanks in advance!