How to assign value to variable

9 vues (au cours des 30 derniers jours)
Mary Johnson
Mary Johnson le 9 Oct 2020
Commenté : Mary Johnson le 9 Oct 2020
My equation is Y+5 = 10, how can i assign value to Y because i keep getting this error.

Réponse acceptée

Ameer Hamza
Ameer Hamza le 9 Oct 2020
You cannot assign value to variable like this. The correct syntax is
y = 10 - 5;
Only variable name can be on left side. I suggest taking this free course to understand the basics of MATLAB: https://www.mathworks.com/learn/tutorials/matlab-onramp.html
  1 commentaire
Mary Johnson
Mary Johnson le 9 Oct 2020
Thank you so much!!

Connectez-vous pour commenter.

Plus de réponses (1)

madhan ravi
madhan ravi le 9 Oct 2020
syms Y
equation = Y + 5 == 10
  1 commentaire
madhan ravi
madhan ravi le 9 Oct 2020
doc syms
I suggest you to do MATLAB Onramp course.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by