How do I convert a "" into a string?

16 views (last 30 days)
I have a python file that I am executing via pyrunfile that returns a number, the number is stored in Matlab as a
I need to turn this number into a string to append to an output, but neither str(, string(, num2str(, or int2str( work.
Here is the approximate setup:
app.program_PID = pyrunfile("", "PID");
class(app.program_PID) %
disp(app.program_PID) % Python with int properties:
% denominator: [1x1]
% imag: [1x1]
% numerator: [1x1]
% real: [1x1]
% 99999
pyrunfile(" " + num2str( app.PhaseSpace_PID ) ); % This does not work "Input num2str must be numeric"

Accepted Answer

Walter Roberson
Walter Roberson on 19 Jun 2022

More Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!