Vector as input for plotting function
11 ビュー (過去 30 日間)
古いコメントを表示
Hello,
i would like to plot with red stars the function: sinc(x)= [sin(πx)]/[πx]
but x would be a vector given by the user
I really dont know how to ask the user to give me the vector and how can i use it as input for my function.
0 件のコメント
回答 (1 件)
madhan ravi
2020 年 6 月 2 日
編集済み: madhan ravi
2020 年 6 月 2 日
x = input('Values of x:') % feed in for example [1,2,3]
y = @sinc;
plot(x,y(x))
4 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!