Symbiological output using 'syms' and 'pretty' commands
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all,
I am having issues outputting the factored polynomial using the below commands using MatLab 2021b (academic license) sybologically.
I have the Symbology Toolbox 'Installed' and can't determine what the issues is.
The online R2021b 'Run' command outputs (MatLab Desired Output.GIF red box) also aren't outputting in my Command Window on my license.
The 'Attachment with run function' also isn't working for the 2021b forum posting. When
I= imread('PolySolver.GIF')
is ommited (online) the answer (ans) is outputted as desired (MatLab Desired Output.GIF).
%% Factor Command
syms x
f1 = factor (x^3 + 2*x -3, x) % Directly below not showing on PC version of 2021b
% Make the factorisation 'pretty'
% Status: Not working
pretty(f1)
% Output
I= imread('PolySolver.GIF')
imshow = I % Attachment with run function not working for 2021b - Online posting
% Desired
(x - 1), (x^2 + x + 3)
0 commentaires
Réponse acceptée
Star Strider
le 25 Nov 2021
Experiment with the indexing into the expressions (since this is a straightforward solution to a number of otherwise difficult problems in MATLAB).
Are these the desired results?
%% Factor Command
syms x
f1 = factor (x^3 + 2*x -3, x) % Directly below not showing on PC version of 2021b
f1(1)
f1(2)
% Make the factorisation 'pretty'
% Status: Not working
pretty(f1)
% Output
I= imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/812799/PolySolver.GIF');
imshow(I) % Attachment with run function not working for 2021b - Online posting
Right-click to copy the full file name to open the file in the in the online Run application. (This works except for .m files, that are painful to use with it.)
.
11 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!