Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

1 visualización (últimos 30 días)
bws1007
bws1007 el 14 de Nov. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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

Respuestas (1)

Walter Roberson
Walter Roberson el 15 de Nov. de 2019
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.

Productos


Versión

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by