Create a triangular wave/sawtooth function error...
1 次查看(过去 30 天)
显示 更早的评论
Im trying to build a sawtooth function but matlab is not letting me run it... this is what its saying, i post a couple of hours ago and the reply i got is that its working for them but its still not working for me... i dont know what its wrong on it... ill appreciate any help thank you
0 个评论
采纳的回答
reen2015
2016-4-11
Please change your file name. You saved it as sawtooth.m, note that sawtooth is an inbuilt function in matlab. try using mysaw.m
4 个评论
Image Analyst
2021-6-26
@Chad Robke, something else must be wrong. I hand typed in all your code and in ran just fine:
T = 2*4;
Fs = 1000;
dt = 1/Fs;
t = 0 : dt : T-dt;
x = sawtooth(2 * pi * t);
x = (x + 1) * 5
plot(t, x, 'b-', 'LineWidth', 2);
grid on;
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!