मंगलवार, 19 जुलाई 2016

2. Vector variables. Make the following variables
a. aVec = [3.14 14 9 28]
b. bVec = 
c. cVec = [10 9.6 −9.6 −10] (all the numbers from 10 to -10 in increments of -0.4)
d. dVec = [5 0 5 0.01 5 0.99 5 1] (logarithmically spaced numbers between 1 and 10, use logspace, make sure you get the length right!)
clc;
close all
clear all
aVec = [3.14 14 9 28];
bVec = [2.74; 4; 38; 12];

cVec(1) = 10;
for i = 1:50;
    cVec(i+1) = cVec(i) - 0.4;
end

dVec = logspace(0,log10(5),101);


कोई टिप्पणी नहीं:

टिप्पणी पोस्ट करें