having function from negative infinity to infinity & having a continuous function in spite of array
Show older comments
hi . I have a function that I put it's code below. you see that I make an array, and I access to the elements 1 to 3000. I need to have this function from negative infinity to infinity. what should I do?? my second question is that it is an array how could I have a continuous function because for example I need to access phi(.1) but because of having array, index should be just positive integer what should I do?
m2=-15;
for i2=1:3000
if (m2>=0 && m2<1)
phi(i2)=1;
else
phi(i2)=0;
end
m2=m2+0.01;
end
if(m2>15 || m2<-15)
phi = 0;
end
% sysc = d2c(phi);
m2=-1500:1:1499;
plot(m2,phi)
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!