summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPratik Karki <predatoramigo@gmail.com>2018-05-31 23:54:37 +0545
committerGitHub <noreply@github.com>2018-05-31 23:54:37 +0545
commit127d91a487c8d960732b9d7f117cbc1176ab67b6 (patch)
tree41e0f0820ca90773e69706c981ea343df50d14b1
parenta1073cdb2ca437f73402ceb3522eabfa7c39d27f (diff)
parent19f3a857fb3f5bd4d4250a0db895b91d0cea2531 (diff)
Merge pull request #3086 from veghp/master
matlab/en "Conditional statements" and "Method" update
-rw-r--r--matlab.html.markdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/matlab.html.markdown b/matlab.html.markdown
index 6dc9f697..b88b1c03 100644
--- a/matlab.html.markdown
+++ b/matlab.html.markdown
@@ -374,8 +374,8 @@ disp('Hello World') % Print out a string
fprintf % Print to Command Window with more control
% Conditional statements (the parentheses are optional, but good style)
-if (a > 15)
- disp('Greater than 15')
+if (a > 23)
+ disp('Greater than 23')
elseif (a == 23)
disp('a is 23')
else
@@ -545,7 +545,7 @@ ans = multiplyLatBy(a,3)
% The method can also be called using dot notation. In this case, the object
% does not need to be passed to the method.
-ans = a.multiplyLatBy(a,1/3)
+ans = a.multiplyLatBy(1/3)
% Matlab functions can be overloaded to handle objects.
% In the method above, we have overloaded how Matlab handles