Surface plot: an extra variable, assigning a value to each element

Hello!
I want to make a surface plot using these variables:
x = (0:1:5); y = (-6:1:6);
The z formula, however, has an extra variable aw that directly corresponds to x.
That is, when x=0, aw=0.9; x=1, aw=0.8; x=2, aw=0.7, etc
Is there any way I could make this surface plot with this condition?

2 件のコメント

Image Analyst
Image Analyst 2014 年 9 月 4 日
What is the formula for z in terms of x and y and aw?
Sara
Sara 2014 年 9 月 4 日
z = 1/(C*(sqrt((aw-aminw))*(y-Tmin)-(x*f))^2; %C, aminw, Tmin and f are constants.

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

回答 (1 件)

Michael Haderlein
Michael Haderlein 2014 年 9 月 4 日

0 投票

Looks like aw=.9-x/10. Just replace this in your equation.

2 件のコメント

Sara
Sara 2014 年 9 月 4 日
My actual values are more random than the ones I stated here, (sorry about that) so I was wondering whether there is some function that addresses these variables together.
Michael Haderlein
Michael Haderlein 2014 年 9 月 5 日
But you sure will have an equation which relates aw and x, don't you? Just use it inside your z equation. I don't know the relation, but if it's something nonsense as
aw=1+(2./x).^log(1-x.^2);
(no idea how that looks in reality), you change your equation
z = 1./(C*(sqrt((aw-aminw)).*(y-Tmin)-(x*f)).^2;
to
z = 1./(C*(sqrt((1+(2./x).^log(1-x.^2)-aminw)).*(y-Tmin)-(x*f)).^2;

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

カテゴリ

質問済み:

2014 年 9 月 4 日

コメント済み:

2014 年 9 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by