When using unitConvert from Celsius to Fahrenheit and vice versa I noticed it was giving me incorrect answers. It is just multiplying or dividing by 9/5ths and forgetting to add or subtract the 32. Is there a way to fix this or is this a bug. Using the unitConvert() function and saw it appeared both 2023a and the mobile version.
The documentation for unitConvert() specifies that "By default, temperatures are assumed to represent temperature differences." This explains the reason why it doesn't apply the 32 degree offset. It further goes on to explain how to do an absolute temperature conversion. The example that is given is this:
I should have clarified, I am trying to use the command/function unitConvert() which when going from Celsius to Fahrenheit converts 100 to 180 in both 2023A and the 2025 version on my tablet. I thought I had included it in the initial post but release must not have saved when I clicked it.
Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.
Translated by
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.