How to assign a variable multiple values?

Say if I would like to run with a variable of "x". But i would like to run "x" across the values of 0 to 100. How would I do that and then plot it verse another variable "y"??
Thank you in advance!

回答 (1 件)

Jan
Jan 2013 年 2 月 14 日
編集済み: Jan 2013 年 2 月 14 日

0 投票

The question is not clear. What does "running x across values" mean exactly?
Perhaps reading the Getting Started chapters of the documentation would reveal something like this:
x = 0:100;
y = sin(x / 10);
plot(x, y);

質問済み:

2013 年 2 月 14 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by