why Command Output
A list of the unique statements generated by a call to the "why" function for input values in the range [0, 2^15]
The output was generated using the following commands:
diary('why.txt'); for j = 0:2^15, why(j); end; diary off;
fh = fopen('why.txt', 'r');
whyOutput = textscan(fh, '%s', 'delimiter', '');
fclose(fh);
[whyOutput, idxs] = unique(whyOutput{1}, 'first');
whyOutput(:, 2) = num2cell(idxs - 1);
[~, sortIdxs] = sort(idxs);
whyOutput = flipud(whyOutput(sortIdxs, :)');
fh = fopen('unique why.txt', 'w');
fprintf(fh, '%5u: %s\n', whyOutput{:});
fclose(fh);
Just wanted to satisfy my curiosity!
Cita come
Jeff Gullett (2026). why Command Output (https://it.mathworks.com/matlabcentral/fileexchange/28502-why-command-output), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- Simulink > Block and Blockset Authoring > Author Block Algorithms > Author Blocks Using MATLAB > Author Blocks Using MATLAB Functions > Programming for Code Generation > Function Definition >
Tag
Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
| Versione | Pubblicato | Note della release | |
|---|---|---|---|
| 1.0.0.0 |
