Fix help text for newer MATLAB versions
Mostrar comentarios más antiguos
I've noticed a change in MATLAB's response to help text. We have equipment that, in the event of an error, automatically generates a trace of internal variables, and creates a MATLAB-formated file that includes help text identifying the machine name, firmware versions and timestamp of the error. We then have scripts that parse the help text and data to generate a human-readable report. We had been using R2010bSP1 for years, but when we updated we find the help() function returns differently. I've tested R2015b and R2016a, below is an example of the change:
data.m:
% Date: Tuesday, September 27, 2016 10:21:14 AM
% Arm B: 0.0.0.3
% Arm M: 2.1.15.8
% FPGA: 86.73.0.0
% Rows: 2048
24 865589 1141503331
25 865589 1112790400
26 865589 1143725291
27 865589 -1002890685
:
2010bSP1:
>> load 'data.m';
>> help('data.m')
Date: Tuesday, September 27, 2016 10:21:14 AM
Arm B: 0.0.0.3
Arm M: 2.1.15.8
FPGA: 86.73.0.0
Rows: 2048
>>
R2015b and R2016a:
>> load 'data.m';
>> help('data.m')
data is a variable of type doub.
>>
Would appreciate any suggestions on how to modify the help() function call to return the help text as before when using newer versions of MATLAB.
Thanks!
Respuesta aceptada
Más respuestas (1)
Massimo Zanetti
el 28 de Sept. de 2016
3 votos
It seems you have a conflict with another file named "data". Try to supply the full path name to the help argument.
3 comentarios
Jon Northup
el 28 de Sept. de 2016
Editada: Jon Northup
el 28 de Sept. de 2016
Massimo Zanetti
el 28 de Sept. de 2016
I have R2015b and it works fine. The difference you notice happens when you invoke "help" with a Matlab variable argument. In this case the help provides you the type of the variable. If you invoke "help" with a function name, then it provides you the first commmented lines of the function. It works like this in ALL versions of Matlab.
Jon Northup
el 28 de Sept. de 2016
Categorías
Más información sobre String Parsing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!