MATLAB Answers

bws1007
0

How to scalean array of data so that the first value is 1

Asked by bws1007
on 14 Nov 2019 at 21:51
Latest activity Answered by Walter Roberson
on 15 Nov 2019 at 0:49
Good evening all!!
For an assignment I am given an array of data that Imust "scale so the first value is zero"
I tried using:
arrayn=normalize(array,'norm',1);
but got the error:
Undefined function 'normalize' for input arguments of type 'double'.
I feel like i am missing something obvious. Why wouldn't the normalize function work on doubles? do i have to convert the whole array?
Thank you

  0 Comments

Sign in to comment.

Products


Release

R2017b

1 Answer

Answer by Walter Roberson
on 15 Nov 2019 at 0:49

normalize() is R2018a or later and you are using R2017b. For releases before that you can use mat2gray()
However I suspect you are intended to write the equivalent code yourself.

  0 Comments

Sign in to comment.