How an script for get the product of G(x)=(x-x1​).*(x-x2).​..(X-Xn)

10 vues (au cours des 30 derniers jours)
FAYE EDGARD
FAYE EDGARD le 18 Oct 2019
Commenté : Bhaskar R le 19 Oct 2019
How whrit an script for get the product of G(x)=(x-x1)*(x-x2)*...(X-Xn) and graphic. Urgent ⚠⚠⚠

Réponse acceptée

Bhaskar R
Bhaskar R le 18 Oct 2019
Modifié(e) : Bhaskar R le 18 Oct 2019
insufficient data
Assuming all the data which may match with your context
n = 8; % number of values
X = 9; % X is the single value
xn = 1:n; % xn is the vector here xn(1) = 1, xn(2) = 2, ... xn(n) = 8
G = prod(X-xn); % G is your product of all values(only one value)
  2 commentaires
FAYE EDGARD
FAYE EDGARD le 18 Oct 2019
Modifié(e) : FAYE EDGARD le 18 Oct 2019
Thanks, Give me now, Their graph Commands. Please sir.
Bhaskar R
Bhaskar R le 19 Oct 2019
Here All values are scalar/single values except xn , to plot graph xn there are mony commands based on your requirement basic one is plot.
plot(xn);
MATLAB provides very clear documentation for every commands, you can get help in the MATLAB Tool

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Produits


Version

R2013b

Community Treasure Hunt

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

Start Hunting!

Translated by