Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
edited body
Source Link
Phonon
  • 12.7k
  • 15
  • 68
  • 115

You should use vector operations

C = sum( A .* B , 2 ); 

The .* operator multipliedmultiplies matrices value-by-value, while sum( <matrix> , 2 ) sums along the rows of a matrix inside the first parameter.

You should use vector operations

C = sum( A .* B , 2 ); 

The .* operator multiplied matrices value-by-value, while sum( <matrix> , 2 ) sums along the rows of a matrix inside the first parameter.

You should use vector operations

C = sum( A .* B , 2 ); 

The .* operator multiplies matrices value-by-value, while sum( <matrix> , 2 ) sums along the rows of a matrix inside the first parameter.

Source Link
Phonon
  • 12.7k
  • 15
  • 68
  • 115

You should use vector operations

C = sum( A .* B , 2 ); 

The .* operator multiplied matrices value-by-value, while sum( <matrix> , 2 ) sums along the rows of a matrix inside the first parameter.