chee
chee

Reputation: 979

How to multiply a matrix by a scalar value in MATLAB

I want to multiply an image by a scalar value in MATLAB. How do I do it?

Upvotes: 5

Views: 30671

Answers (1)

Paul R
Paul R

Reputation: 212959

You just use the * operator, as you might expect, e.g.

y = x * k;

where x is the input image, k is a scalar value, and y is the resulting scaled image.

Upvotes: 16

Related Questions