Question: Question I ( 2 0 marks ) . Write a Matlab function [ v ] = q 1 _ 2 4 0 2 6 0

Question I (20 marks). Write a Matlab function [v]= q1_2402605(n) that takes a natural number n and returns a vector of decimal digits of this number.
For example,
q1_2402605(185) returns vector [185];
q1_2402605(2024) returns vector [2024];
q1_2402605(2402605) returns vector [24002605];
The program should work correctly for other reasonable inputs.
If n is not natural, the function should return empty vector v=[].
Save your function as m -file with the name q1_2402605.m and submit it with your answers.
Note that the function should return the answer as a vector. In addition, it can display output and/or messages to the screen, but the function will be evaluated based on its output v.
Question I ( 2 0 marks ) . Write a Matlab

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!