apostrophe after linspace code

Marc Normandin mnormand at iupui.edu
Thu Jun 12 22:23:19 CDT 2008


Dmitri A. Sergatskov wrote:
> On Thu, Jun 12, 2008 at 9:51 PM, Marc Normandin <mnormand at iupui.edu> wrote:
>> Siddhartha wrote:
>>> can anyone tell me the significance of having the apostrophe
>>> ' after a line of code?
> 
>> The apostrophe acts as the transpose operator, flopping rows for columns
>> and columns for rows.  In your example, the act of transposing simply
>> turns a row vector (see variable y below) into a column vector.
>>
> 
> 
> This is a common misconception.
> Try
> x = [1, 2+i, 3+i]
> x'
> x.'
> 
> Regards,
> 
> Dmitri.
> --

Thanks Dmitri, I stand corrected.  Learn something new every day :)

Regards,
Marc

-- 
------------------------------------------------------------------
Marc D. Normandin              http://web.ics.purdue.edu/~mdnorman
Graduate Research Assistant                     mnormand at iupui.edu
Indiana University School of Medicine           317-278-9841 (tel)
Department of Radiology, Division of Research   317-274-1067 (fax)
------------------------------------------------------------------


More information about the Help-octave mailing list