26.9k views
3 votes
Write a MATLAB function named lin_spaced_vector with two inputs and one return value. The first input will be a single real number representing a lower bound The second input will be a single real number representing an upper bound The return value must be a list of 200 numbers evenly spaced between the lower bound and the upper bound.

User AlexITC
by
5.7k points

1 Answer

6 votes

Step-by-step explanation:

==================

lin_spaced_vector.m

==================

function out=lin_spaced_vector(in1,in2)%defining function

out=linspace(in1,in2,200);%200 spaced numbers between in1 and in2

end​

===================

Executable File

===================

clear all%clears history

clc%clears screen

lin_spaced_vector(1,10)%calling function​

clear all

clc

lin_spaced_vector(1,10)

Write a MATLAB function named lin_spaced_vector with two inputs and one return value-example-1
User Tsimtsum
by
5.8k points