Reputation: 375
Is it possible to add statements in between the codes.
For example: If I have a code like this,
r(:,1) = a(:,1) - a(:,2);
Then can I write it as,
r(:,1) = a(:,1)("this is a constant") - a(:,2)("this is a variable");
Upvotes: 0
Views: 79
Reputation: 2724
Just as a sideremark to the very correct answer of sudomakeinstall2
In other programming languages, as e.g. Java you can do something like
myvar = 1 + /* some comment here */ 5;
Eventhough MATLAB knows something similar with %{
ending with %}
, they only work for multiline comments, so in the end, sudomakeinstall2s answer is the best I can think of.
Upvotes: -1