MATLAB: Sprintf is it safe to use


Is it safe to use the code sprintf? because i was reading something and it said that sprintf is not safe to use

Best Answer

  • It's not safe for C where strings are 0 terminated.
    But for MATLAB the length is inside an internal (mxArray) structure, so it's totally safe.