Write a MATLAB function called countOfNumbers that takes an array (which contains numbers) as the input argument. This f

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a MATLAB function called countOfNumbers that takes an array (which contains numbers) as the input argument. This f

Post by answerhappygod »

Write A Matlab Function Called Countofnumbers That Takes An Array Which Contains Numbers As The Input Argument This F 1
Write A Matlab Function Called Countofnumbers That Takes An Array Which Contains Numbers As The Input Argument This F 1 (192.04 KiB) Viewed 15 times
?
Write a MATLAB function called countOfNumbers that takes an array (which contains numbers) as the input argument. This function will count the occurrence of all the digits in [0,9] in the input array. The count of each digit will be saved in an array called counts and this array will be returned by countOfNumbers function. The array length can be of any length. You must write the codes with functions and arrays. You cannot use any built-in MATLAB functions (except for zeros) for this question's solution. No other solution will be accepted. Example run outputs: >> a = [5 6 2 3 4 2 9 1 0 8 5 4 8]; >> countOfNumbers (a) ans = 1 1 2 1 2 2 1 0 2 1 >> >> a = [9 9 9]; >> countOfNumbers (a) ans 0 0 0 0 0 0 3 0 0 0
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply