TUTORIAL: how to format your question with markup

Oleg Komarov on 6 Aug 2011
Latest activity Reply by fatih erkin on 8 Mar 2023

[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]
  • 06 Aug 2011, 13:17 BST - created and added boldface.gif
  • 06 Aug 2011, 14:59 BST - added italic.gif
  • 06 Aug 2011, 18:58 BST - added index section
  • 07 Aug 2011, 00:03 BST - added code.gif and tutorial series section
  • 07 Aug 2011, 01:50 BST - added monospaced.gif, numlist.gif, bullist.gif and hyperlink.gif
  • 13 Aug 2011, 14:27 BST - added motivation section
  • 18 Aug 2011, 01:44 BST - added aknowledgments section and link to wish-list
--------------------------------------------------------------------------------------------------------------------------------------
[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.
fatih erkin
fatih erkin on 8 Mar 2023
thanks
Walter Roberson
Walter Roberson on 16 Apr 2018
That is not relevant to this discussion. You should ask your own Question about it.
Image Analyst
Image Analyst on 13 Aug 2016
To insert an image into the body of your post, click this icon:
and either browse to a file on your computer, or specify a URL of an image on the web.
You might find it easy to use http://snag.gy. You can just type alt-PrintScreen (in Windows) to capture the active window into the clipboard. Then go to this web site and type control-v to paste it in. You can then crop if it you want. It gives you a URL that you can then paste into the URL field you see when you click the green and brown frame icon:
You can also use the paper clip icon to attach an image file to your post, but it will not be displayed. It will appear as a filename beneath your text. We would then have to right click that filename and save it to our computer, and then open the image in MATLAB or some other image file viewer. This is less convenient for readers because they can't see your picture immediately.
madhan ravi
madhan ravi on 11 Nov 2018
Thank you sir Image Analyst it turned out only jpg format can be viewed directly
Image Analyst
Image Analyst on 11 Nov 2018
After you click Insert Image, try putting a blank line before the < < and a blank line after the > >.
Ryan
Ryan on 18 Oct 2012
@Elige: Yes... the first two used tinypic the latter used uploadhouse. I uploaded the first two .gif's to uploadhouse for you.
Sean de Wolski
Sean de Wolski on 18 Oct 2012
Me too.
Jan
Jan on 27 Nov 2011
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.
Oleg Komarov
Oleg Komarov on 3 Nov 2011
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.
Walter Roberson
Walter Roberson on 31 Oct 2011
Oleg, perhaps you could record one of these for inserting an image?
Walter Roberson
Walter Roberson on 18 Aug 2011
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. :( :(
Walter Roberson
Walter Roberson on 13 Aug 2011
With Motivation of course comes http://en.wikipedia.org/wiki/Method_acting ;-)