why Command Output

A list of the unique statements generated by a call to the "why" function
294 download
Aggiornato 18 ago 2010

Visualizza la licenza

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
Creato con R2010a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Versione Pubblicato Note della release
1.0.0.0