[INDEX]
--------------------------------------------------------------------------------------------------------------------------------------
[MOTIVATION]
Why should we use markups in the body of our questions?
The answer is a question: which of the two versions is more likely to be understood in a glimpse and has more chances to be answered by our readers?
.
< Consider the following question >
I have a vector of weights W=[10,20,30,50,23434,1,2.4,2] and a matrix A=rand(100,8) and I would like to find the row-wise weighted sum of A. I am proceeding in the following way: B=zeros(size(A)); for c=1:numel(W) B(:,c)=A(:,c)*W(c); end B=sum(B,2); Somehow I get huge numbers can you please help?
.
< Now, consider its formatted version >
I have a vector of weights W = [10,20,30,50,23434,1,2.4,2] and a matrix A = rand(100,8) and I would like to find the row-wise weighted sum of A.
I am proceeding in the following way:
B = zeros(size(A));
for c = 1:numel(W)
B(:,c) = A(:,c)*W(c);
end
B = sum(B,2);
Somehow I get huge numbers can you please help?
--------------------------------------------------------------------------------------------------------------------------------------
[AKNOWLEDGMENTS]
In alphabetical order by nickname, thanks for their suggestions to:
Walter Roberson
--------------------------------------------------------------------------------------------------------------------------------------
[LOG]
--------------------------------------------------------------------------------------------------------------------------------------
[TUTORIAL Series]
Do not forget to read the Markup help (located on the top-right corner of the Body pane)
Vote on Wish-list for MATLAB Answer sections my post if you think that a tutorial section on top of Answers could be useful.
No products are associated with this question.
BOLDFACE
Note: the bold mode only works between pairs of * in the same paragraph. If you highlight several paragraphs (with empty lines between them) and click on the Bold button, although an * will be put on the first line and last line of the selection, the bold will "break" because of the empty lines.
ITALIC
Note: the italic mode only works between pairs of underscores in the same paragraph. If you highlight several paragraphs (with empty lines between them) and click on the Italic button, although an underscore will be put on the first line and last line of the selection, the italics will "break" because of the empty lines.
CODE
Note: the beginning of the code must be preceded by an empty line.
Note: the code formatting mode will last to the first empty line, even if there are no spaces at the beginning of the lines in the block.
MONOSPACED
Note: the monospaced mode only works between pairs of bars in the same paragraph. If you highlight several paragraphs (with empty lines between them) and click on the monospace button, although an bar will be put on the first line and last line of the selection, the monospace will "break" because of the empty lines.
NUMBERED LIST
Note: the numbering sequence restarts at each empty line, so do _not_ put blank lines between the portions.
Note: the # must be after a "real" line break, where carriage return was typed at the end of the previous line; it is not sufficient to put it at what looks like the beginning of a line, if the line has been automatically wrapped down from the previous line.
BULLETED LIST
Note: the * must be after a "real" line break, where carriage return was typed at the end of the previous line; it is not sufficient to put it at what looks like the beginning of a line, if the line has been automatically wrapped down from the previous line.
HYPERLINK
Simple hyperlinks are _not_ converted automatically by the site: that is being done by browsers.
Note: ensure that there is no whitespace space immediately after the < or immediately before the > or else the link will not be created.
Note: there must be whitespace (or beginning of line) immediately before the < or else the link will not be created. In particular, some people like to put links in brackets such as (<some link or other>) and that will not work because there must be a space before the < .
14 Comments
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_29236
Well done, Oleg! How did you do it?
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_29243
I used Camtasia Studio to record the desktop, edit the image and produce the gif which I then uploaded to a repository
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_29246
I see. My experience on all those types of image files is all static pictures. Apparently GIF file supports animation too.
Please, add the illustration for formatting code. Should be just similar. But you know, that is the most occurred problem.
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_29250
Poor Jan, if the Mathworks folks see this, they are never going to deal with the keyboard latency.
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_29316
Ouch. I thought of posting a realtime animated GIF of the latency effects in my moaning thread. But unfortunately my computer is loaded by 100% during the keystrokes and the screen recorder is blocked. Then I take a movie with a camera - but it looks so slow, that only patient users believe, that it is an animation at all. :-(
I never use the buttons but type the format characters directly - this works in an external editor also...
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_29450
@Walter: I will update the .gifs asap according to your comments.
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_30046
With Motivation of course comes http://en.wikipedia.org/wiki/Method_acting ;-)
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_30761
Perhaps a note could be added somewhere that if you want a < and > that is *not* in a Code section, then either there must be whitespace after the < or before the >, or else < and > must be coded.
Also, perhaps a note that none of these formatting commands apply in Comments (distinguished, of course, from comments in the code).
Oh yeah, and I'd warn about the massive bug if you have a quoted line in a Comment or edit an Answer that contains such a line. :( :(
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_43519
Oleg, perhaps you could record one of these for inserting an image?
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_44403
Very busy this period, as you may have noticed I almost disappeared from the forum. I am moving to London (looking for accomodation...it's a nightmare here), starting a PhD and I need first to finalize the work in progress pages about my dissertation.
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_48780
Dear Oleg: Thanks. I really appreciate this thread.
Unfortunately newcomers in this forum do not read the 20 most voted threads before they ask an own question.
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_105902
Me too.
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_105911
@Elige: Yes... the first two used tinypic the latter used uploadhouse. I uploaded the first two .gif's to uploadhouse for you.
Direct link to this comment:
http://www.mathworks.com/matlabcentral/answers/13205#comment_105934
Since my problems turned out to be unique to me, I deleted my above comments so as not to cause confusion.