How an script for get the product of G(x)=(x-x1).*(x-x2)...(X-Xn)
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How whrit an script for get the product of G(x)=(x-x1)*(x-x2)*...(X-Xn) and graphic. Urgent ⚠⚠⚠
0 commentaires
Réponse acceptée
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
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
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!