What does this simple character do - MATLAB?

I work with some matlab code that I drew from another person, I don’t understand the meaning of the q = [q; th ']. I feel that I should be able to simply remove it so that q = distribuc ...

function [ q ] = ObtainHistogramForEachTarget( state, numberOfTargets, image, q )

    for i=1 : numberOfTargets
        qi = distribucion_color_bin_RGB2(state(i).xPosition,state(i).yPosition,state(i).size,image,2);
        q = [q; qi'];
    end
end

Can someone explain this to me?

+5
source share
5 answers

MATLAB has several built-in functions for managing matrices. The special character ',, for the stroke indicates transposition of the matrix.

A A = [ 1 2 3;4 5 6;7 8 9]'matrix appears in the statement

A = 
   1 4 7 
   2 5 8
   3 6 9

hope this helps

+9
source

From Matlab Help

help ctranspose
 'Complex conjugate transposition.
     X 'is the complex conjugate transposition of X.

 B = ctranspose(A) is called for the syntax A' (complex conjugate
 transpose) when A is an object.
+4

[X ; Y] . , q. q, , .

' . , distribucion_color_bin_RGB2, , -, , .

@ja72, .' ( ) ' , , , .

+2

A '- A, . ,

transpose (A) - , R-, C-.

I usually use A ', it's easy, but I changed my habit until I encountered an error in the FFT conversion

0
source

I ran into the same problem and tested it using an octave (matlab in ubuntu), and found that for a prime complex number it a a'means conjugation.

octave:2> a = 1 + 1j
a =  1 + 1i
octave:3> a'
ans =  1 - 1i

In addition, to a complex matrix A:

octave:6> A = [1 + 2j 1 - 2j ; 2 - 1j 2 + 1j]
A =

   1 + 2i   1 - 2i
   2 - 1i   2 + 1i

octave:7> A'
ans =

   1 - 2i   2 + 1i
   1 + 2i   2 - 1i
0
source

All Articles