For my data, how should I edit it with this program?

1 回表示 (過去 30 日間)
Wesley
Wesley 2020 年 12 月 4 日
編集済み: per isakson 2020 年 12 月 4 日
clear all
clc
n=input('Enter no. of points ');
w=input('Press 1 for entry through mouse or 2 for keyboard repectively-->');
n1=n-1;
if w==1
axis([0 100 0 100])
[p]=ginput(n);
end
if w==2
[p]=input('Enter co-odinates of points within brackets ->[x1 y1;x2 y2;x3 y3;...;xn yn] ');
end
for i=0:1:n1
% for calculating (x!/(y!(x-y)!)) values
sigma(i+1)=factorial(n1)/(factorial(i)*factorial(n1-i));
end
l=[];
UB=[];
for u=0:0.002:1
for d=1:n
UB(d)=sigma(d)*((1-u)^(n-d))*(u^(d-1));
end
l=cat(1,l,UB); %catenation
end
P=l*p;
line(P(:,1),P(:,2))
line(p(:,1),p(:,2))
  1 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 12 月 4 日
https://www.mathworks.com/learn/tutorials/matlab-onramp.html

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeHistorical Contests についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by