フィルターのクリア

i want to plot this function

1 回表示 (過去 30 日間)
sinaraper13
sinaraper13 2016 年 11 月 2 日
コメント済み: Walter Roberson 2016 年 11 月 5 日
don't no at all about this
  1 件のコメント
Walter Roberson
Walter Roberson 2016 年 11 月 5 日
Is the right-hand portion intended to be a rewriting of the middle portion, or is it intended that you solve the middle and right hand parts for equality in terms of one of the variables?
At first the right side looks like a rewrite, but if it were a rewrite I would expect the right side to be in terms of sin(theta_t) instead of in terms of sin(theta_i) .
Also if it were a rewrite, I would expect a range restriction to be stated, as the equation cos(x) -> sqrt(1-sin(x)^2) is not valid between Pi/2 and 3*Pi/2. cos(x)^2 = 1 - sin(x)^2 is true, but when you take the square root you have to pay attention to signs.

サインインしてコメントする。

回答 (1 件)

Nick Counts
Nick Counts 2016 年 11 月 5 日
Sinaraper,
Without going into the mathematics of that function, here is a strategy for tackling a complex plotting task.
  1. Make a vector for the independent variable (In your case, I assume that's theta)
  2. Break up the expression into manageable chunks and assign their values to variables.
  3. Combine the chunks
  4. Plot
Here's a quick example to get you started:
% Step 1: Make an independant variable vector
theta = 0:0.001:2*pi();
% Step 2: Break up the expression into manageable pieces
numerator = cos(theta(1)) - cos(theta);
denomenator = cos(theta(1)) + cos(theta);
% Step 3: Combine the pieces:
expression = numerator ./ denomenator;
% Note the ./ above - this is not matrix division, but going
% element-by-element
% Step 4: Plot!
plot(theta, expression)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by