필터 지우기
필터 지우기

Plotting shapes based on equations and weights.

조회 수: 1 (최근 30일)
Anmol Pardeshi
Anmol Pardeshi 2019년 2월 18일
편집: Matt J 2019년 2월 19일
Let us say I have weights w0, w1,w2 and I want to fit a line such that w0(1)+w1x+w2y=0 or any other shape, how do I do it? Is there a specific function that accepts the weights and the degree of variable/axis?
I can accept answers to question with reference to or pertanent to Machine Learning boundaries for classification.
Thanks in advance :)
  댓글 수: 2
Walter Roberson
Walter Roberson 2019년 2월 18일
What is the input data? What output values are you attempting to find?
It looks to me as if you have the linear equation
y = - w1/w2 * x - w0(1)/w2
and that you might be hoping to fit for unknowns w1, w2, and w0(1) .
If that is the case, then it cannot be done: you can only fit for the ratios w1/w2 and w0(1)/w2
However, if one of those values is already known then you can fit for the other two.
Anmol Pardeshi
Anmol Pardeshi 2019년 2월 18일
I am not trying to find these weights. I already have the values of these weights - for example w0=0.5 ; w1=-3 ; w2=-0.5.
What I want to know is ff there is a function available where I can pass these weights and the equations I want it to fit in and the function just outputs the plot. (In this case if I pass the function with my weights and my function, it plots a straight line for me.)

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

답변 (1개)

Matt J
Matt J 2019년 2월 19일
편집: Matt J 2019년 2월 19일
For 2D and 3D functions, you can use fimplict and fimplicit3, e.g.,
fimplicit(@(x,y) w0+w1*x+w2*y)

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by