log2(x)

7 visualizaciones (últimos 30 días)
nastya nastya
nastya nastya el 24 de Mayo de 2020
Comentada: Gautam el 24 de Mayo de 2020
Здравствуйте, помогите пожалуйста исправить ошибку.
Пишу функцию:
function [F] = log2(x)
F = log(x)/log(2);
end
Но мне выдает ошибку:
Not enough input arguments.
Error in log2 (line 2)
F = log(x)/log(2);
  2 comentarios
nastya nastya
nastya nastya el 24 de Mayo de 2020
function [F] = log2(x)
F = log(x)/log(2);
end
Gautam
Gautam el 24 de Mayo de 2020
After writing your function save the file. Then in MATLAB command prompt try
>> value = log2(10);
PS: You dont have to create this function. Since log2 is a built-in MATLAB function https://www.mathworks.com/help/matlab/ref/log2.html

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by