Question

In: Physics

Given the following series, tn = 10tn-1+1 where tn is the current term and tn-1 is...

  1. Given the following series,

tn = 10tn-1+1

where tn is the current term and tn-1 is the previous terms.

Write a Matlab function, which will receive t n-1 will calculate and return tn.

  1. Use a for loop to call the function in (a) and print the first 10 terms computed by tn for n=1,…,10. Assume that t0 = 0.

  1. Write a Matlab script that loops until the sum of series is 12345 and display the numbers of terms added to get the specified result.

Solutions

Expert Solution

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%a and b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%a and b

t0=0;
n=10;

for i=1:n
  
tn=(10*t0)+1;
  
t0=tn;
  
fprintf("the value of function=%d\n",t0)
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%c%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%c
sum=0;
b=0;
while sum<12345
c=(10*b)+1;
b=c;
sum=sum+c;
fprintf("the sum of series is =%d\n",sum)

end
%%%%%%%%%%%%%%Results%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%the value of function=1
%the value of function=11
%the value of function=111
%the value of function=1111
%the value of function=11111
%the value of function=111111
%the value of function=1111111
%the value of function=11111111
%the value of function=111111111
%the value of function=1111111111
%the sum of series is =1
%the sum of series is =12
%the sum of series is =123
%the sum of series is =1234
%the sum of series is =12345


Related Solutions

Given the following series: 1, 2, 5, 26, 677, ….. such that the nth term of...
Given the following series: 1, 2, 5, 26, 677, ….. such that the nth term of the series equals to (n-1)th ^2 +1 and the first term of the series is 1. Write a C program using recursive function named f to compute the nth term. Use for loop to print the values of first n terms in the series. You will take input n from the user. Example output: Enter number of terms: *value* *numbers here* nth term: *value*...
Consider the time series given by yt = a1yt-1 + a2yt-2 + εt. Where εt is...
Consider the time series given by yt = a1yt-1 + a2yt-2 + εt. Where εt is independent white noise and yt is stationary. A.    Compute the mean of yt. E(yt) B.   Compute the variance of yt. E[yt − E(yt)]2 C.    Compute the first three autocovariances for yt. (E[(yt −E(yt))(yt−i −E(yt−i))] i=1,2,3).
Using laplace transformations, find the charge and current of an LRC circuit in series where L=1/2h,...
Using laplace transformations, find the charge and current of an LRC circuit in series where L=1/2h, R=10ohm, C=1/50f, E(t)=300V, q(0)=0C, i(0)=0A. ( Lq'' + Rq' + (1/C)q = E(t) ). The answer is q(t) = 10 - (10e^-3t)cos(3t) - (10e^-3t)sin(3t) and i(t) = (60e^-3t)sin(3t).
Given the series of numbers: {1.,0.612547,0.466856,0.375214,0.311459,0.264691,0.229088,0.201197,0.17884,0.160573,0.145406,0.132639,0.121764,0.112404,0.104273,0.0971538,0.0908741,0.0852989,0.08032,0.0758497,0.0718166,0.0681615,0.0648355,0.0617975,0.0590128
Given the series of numbers: {1.,0.612547,0.466856,0.375214,0.311459,0.264691,0.229088,0.201197,0.17884,0.160573,0.145406,0.132639,0.121764,0.112404,0.104273,0.0971538,0.0908741,0.0852989,0.08032,0.0758497,0.0718166,0.0681615,0.0648355,0.0617975,0.0590128,0.056452,0.05409,0.0519052,0.0498791,0.0479955,0.0462403,0.0446012,0.0430675,0.0416295,0.0402789,0.0390081,0.0378105,0.0366801,0.0356115,0.0346001,0.0336414,0.0327315} What is the 100th term to 12-decimal places? How is this sequence made?
Introduction The course project is a series of elements where you will examine the current standing...
Introduction The course project is a series of elements where you will examine the current standing of an organization’s compensation system. In the final element of the training program, you will provide recommendations to the organization on how the compensation program can be improved. Directions Students will conduct an analysis on the current state of the compensation system and address the current pay structure used. Reference should be made to job-based and person-based structure. Analysis should reference sources of information...
Using Laplace transform, find the load and current of the LRC series circuit where L =...
Using Laplace transform, find the load and current of the LRC series circuit where L = 1 / 2h, R = 10ohms, C = 1 / 30f, E (t) = 300V, q (0) = 0C, i (0 ) = 0A
1: Explain the term ‘autoregression’ in a time series regression context. 2. Explain the term ‘autocorrelation’...
1: Explain the term ‘autoregression’ in a time series regression context. 2. Explain the term ‘autocorrelation’ and the problems it creates when using OLS regression in time series data.
1: Explain the term ‘autoregression’ in a time series regression context. 2. Explain the term ‘autocorrelation’...
1: Explain the term ‘autoregression’ in a time series regression context. 2. Explain the term ‘autocorrelation’ and the problems it creates when using OLS regression in time series data.
For a current probe in series with a capacitator 1. What would the Current Probe read...
For a current probe in series with a capacitator 1. What would the Current Probe read soon after you connected the leads to the battery? Why? 2. Suppose you were able to connect the leads to the battery momentarily, disconnect them, then flip the battery, reconnect the leads, and repeat the process a number of times. What effect would this have on the current in the circuit? Why? 3. If the capacitor were replaced by an inductor and the leads...
1.) Given the following: Current Assets $ 18,000 Accounts Receivable $ 3,000 Current Liabilities $ 16,000...
1.) Given the following: Current Assets $ 18,000 Accounts Receivable $ 3,000 Current Liabilities $ 16,000 Inventory $ 2,000 Net Sales $ 41,000 Total Assets $ 29,000 Net Income $ 6,000 Find the following (round to the nearest hundredth if needed): A. Current ratio ? B. Acid test ? C. Average day's collection ? days D. Asset Turnover ? E. Profit margin on sales ? 2.) Complete using trend analyses for sales. Round to nearest percent and use 2014 as...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT