![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/178656/image.png)
What's the problem?
1 回表示 (過去 30 日間)
古いコメントを表示
Augusto Borges Resende
2017 年 10 月 13 日
編集済み: Walter Roberson
2019 年 11 月 2 日
I do not know what the code problem is for not plotting:
t=-50:1:50; y=(t.^2+9)/(t-3.^2); plot(t,y,'-k');
0 件のコメント
採用された回答
Image Analyst
2017 年 10 月 13 日
編集済み: Image Analyst
2017 年 10 月 13 日
You forgot to use dot slash to do an element by element divide:
t = -50 : 1 : 50;
y = (t.^2 + 9) ./ (t-3^2);
plot(t, y, 'k-', 'LineWidth', 2);
grid on;
xlabel('X', 'FontSize', 20);
ylabel('Y', 'FontSize', 20);
The above code works fine.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/178656/image.png)
0 件のコメント
その他の回答 (1 件)
Jonathan Chin
2017 年 10 月 13 日
I assume you wanted to do an element divide see small below
t=-50:1:50;
y=(t.^2+9)./(t-3.^2);
plot(t,y,'-k');
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!