Unit Converter: Miles to Feet. Having trouble outputting an array.

2 次查看(过去 30 天)
I am trying to write a script that converts miles to feet. The output can be a single number or an array of numbers.
When I run the function it works well with one numer but when i input multiple numbers it says there are too many input arguments.
Here is my code:
function [feetConversion] = mileConverter(miles)
unitConvCalc = miles * 5280;
feetConversion = [unitConvCalc]
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by