مساعدة


(system) #1

السلام عليكم

كيف حالكم

ارجو مساعدتي في حل هذا الهومورك

زهقت وانا احوال احله كله بس مو قادر اطبقه كله في البرنامج

ارجو المساعدة

The H.W says

lAfter the economic crisis that has faced the world recently, investors and most people are trying to find a safe-haven for their money. In this project, you will investigate the validity of investing in gold:

. Plot the prices of gold in USD for the past 30 years (from 1980 t0 2010).

2.Find the maximum price of gold in that period and state in which year did it occur?

2. Find the maximum and minimum rate of change (USD/year) and indicate the years in which they have occurred.

 [LEFT][COLOR=white][FONT=&quot][/font][/color]

[/left]


(system) #2

انا قدر اعمل

 
Year=[1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010];
Price=[612.56 459.71 375.81 424.18 360.42 317.22 367.53 446.48 436.98 381.44 383.51 362.11 343.82 359.77 384.00 383.79 387.81 331.02 294.24 278.98 279.11 271.04 309.73 363.38 409.72 444.74 607.46 695.39 871.96 972.35 1223.81];
plot(Year,Price) 
title('Gold Price')
xlabel('A.D.')
ylabel('USD')


#3

جرب الاتى



maximumPriceOfGold = max(Price)
A = find(Price == maximumPriceOfGold);
maximumPriceOfGoldAtYear = Year(A)

rateOfChange = Price ./ Year;

maxRateOfChange = max(rateOfChange)
minRateOfChange = min(rateOfChange)

maxRateOfChangeYear = Year(find(rateOfChange == maxRateOfChange))
minRateOfChangeYear = Year(find(rateOfChange == minRateOfChange))