Represent the result of matrices manipulation as rational numbers
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Fatma Alnabrisi
le 6 Déc 2019
Modifié(e) : Fatma Alnabrisi
le 6 Déc 2019
Hi everyone
I need to represent my resultant matrix with rational number rather than decimal point.
for example I have matrix A = [ 1/2 1/3 ; 4 5/6]
B = [ 2 1/4 ; 4 1 ]
C = A+B
how to get C as [ 5/2 7/12 ; 8 11/6]
0 commentaires
Réponse acceptée
JESUS DAVID ARIZA ROYETH
le 6 Déc 2019
format rat
A = [ 1/2 1/3 ; 4 5/6]
B = [ 2 1/4 ; 4 1 ]
C = A+B
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!