필터 지우기
필터 지우기

n-dimensional plotting in Matlab

조회 수: 7 (최근 30일)
Khanh
Khanh 2011년 10월 26일
So, I have n-dimensional vector x=(x1, x2, x3,...,xn) and a function of vector x: f(x) which is the result of mathematical operations on x1, x2, ..., xn.
I want to plot (x, f(x) ). In my understanding, I will need to plot it in a (n+1) dimensional space (1 axis for each xi and an axis for f(x) ). Is that correct?
How can I do that in Matlab? I only see plot and plot3 in Matlab.
Thanks,

채택된 답변

Wayne King
Wayne King 2011년 10월 26일
Hi, You can't. How would you visualize say a ten-dimensional space? Even for complex-valued functions where you have two dimensions for the input variable and two dimensions for the output variable, the solution is to plot two separate planes to show the mapping between the input and output.
  댓글 수: 1
Khanh
Khanh 2011년 10월 27일
Yes, I agree, visualization is the hard part. Thanks for your quick response.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Walter Roberson
Walter Roberson 2011년 10월 26일
There is no direct way to represent more than 3 dimensions in MATLAB plots (a common industry deficit!). You can use isoline plots, or you can represent one of the dimensions by color, or you can represent one of the dimensions by transparency, or you can represent one of the dimensions by point size.
Personally I don't think transparency works at all well as a dimensional representation, so I would say that there isn't any good way to do more than 5 dimensions. I guess you could use texture differences, perhaps.
Even 4D gets hard to read, in my opinion.
  댓글 수: 1
Khanh
Khanh 2011년 10월 27일
+1 Thank you, Walter. I understand how to represent dimensions by color but not sure how to represent it by transparency or point size.

댓글을 달려면 로그인하십시오.


bym
bym 2011년 10월 26일
do you mean:
x = 1:10;
y = x^2 % for example
plot(x,y) % ??? (I must be missing something)
  댓글 수: 2
Walter Roberson
Walter Roberson 2011년 10월 26일
No, Khanh is using a function that maps R^n to R^1. Or, equivalently, is using a function over n variables that produces a single numeric value for any unique combination of variable values
For example, f(x,y,z,a,b,c,d,e,f,g) is a function in 10 variables, which is completely isomorphic to working on a function with a single variable with each element of the variable being a vector of length 10, a 10-dimensional point.
Khanh
Khanh 2011년 10월 27일
yes, that's exactly what I meant. Thank you, Walter.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by