In matlab write a function which outputs the base 3 logarith

(In matlab) write a function which outputs the base 3 logarithm of the input number. if the number is less than or equal to zero, the function is to output a message saying th
(In matlab) write a function which outputs the base 3 logarithm of the input number. if the number is less than or equal to zero, the function is to output a message saying th
(In matlab) write a function which outputs the base 3 logarithm of the input number. if the number is less than or equal to zero, the function is to output a message saying th

Solution

The following code will give you required functionality:

function y = logarithm(x)

if x>0

y = log10(x)/log10(3)

else

disp(\"negative value\")

end

Hope it helps, do give your response.

 (In matlab) write a function which outputs the base 3 logarithm of the input number. if the number is less than or equal to zero, the function is to output a m

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site