Question

In: Computer Science

question 1 (explain each code) If more information if needed please let me know a)t=linspace(0,1,1000); %...

question 1 (explain each code)

If more information if needed please let me know

a)t=linspace(0,1,1000); % Time t

Meaning:

b) for i=1:1000

xt(i)=v*cos(theta*pi/180)*t(i);

yt(i)=h+(v*sin(theta*pi/180)*t(i))-0.5*g*t(i)^2;

end

Meaning:

c) k = find(yt<0,1) % find index at which distance becomes

fprintf('Ball hits the ground at distance of %d meters',xt(k))

Meaning:

d) x=0:0.1:max(xt);

y=0;

plot(x,y*ones(size(x)),'--k')

Meaning:

Solutions

Expert Solution


Related Solutions

please let me know reference of this MATLAB code. please explain this code line by line....
please let me know reference of this MATLAB code. please explain this code line by line. . . N=256; %% sampling number n=linspace(0,1,N); fs=1/(n(2)-n(1)); x=5*(sin((2*pi*10*n))); %% create signal N=length(x); f=[-fs/2:fs/N:fs/2-fs/N]; subplot(211) plot(f,fftshift(abs(fft(x)))); title('|G(f)|');grid; xlabel('frequency'); ylabel('|G(f)|'); %Zero padding xx=[zeros(1,128) x zeros(1,128)]; N=length(xx); f=[-fs/2:fs/N:fs/2-fs/N]; subplot(212) plot(f,fftshift(abs(fft(xx)))); title('|Gz(f)|');grid; xlabel('frequency'); ylabel('|Gz(f)|');
Below is the only information I received for these questions. Please let me know if there...
Below is the only information I received for these questions. Please let me know if there is any additional info you may need. Any questions will help Federal Taxation I Module 8: Comprehensive Tax Return Project Jared and Ashley have come to you for help filing their 2018 tax return. They are married on December 31, 2018 and are both age 40. They live with their three qualifying children, Nick, Betty, and Roger, who are 12, 14, and 17 years...
Use the article to answer these questions. Let me know if you need more information. What...
Use the article to answer these questions. Let me know if you need more information. What question was asked? Summarize the main points of the article—what is the primary goal or aim of the described study? How was the question asked? Summarize the main methods used in the study. What did the authors find? Summarize the major results of the study. How does this article provide background information for quorum sensing in gingivitis? Some possible questions you could address…How does...
Please let me know how to make code sort. If you put sort (sort 1000 6...
Please let me know how to make code sort. If you put sort (sort 1000 6 5 4 3 2 1, not separate), you will get 1 2 3 4 5 6 1000. sort 50 300 27 5 5 27 50 300 public static void main (String[] args) {        Scanner scnr = new Scanner(System.in);        String a = "";            a = scnr.nextLine();            String[] b = imput.split(" ") if (b[0].equalsI("sort")) { }...
Let me know if the Adjusted trial balance on December 31, 20X6 is needed to answer...
Let me know if the Adjusted trial balance on December 31, 20X6 is needed to answer the below as I can provide it. Thank you! Questions 4 through 10 are based on the following December 31, 20X6 year-end account balances for XYZ Co. after adjusting entries had been prepared but before the books were closed for the year.                                                                  Cash……………..…………………………….250,000                 Accounts receivable…………………….……..680,000                 Marketable securities…………………………...60,000                 Prepaid insurance……………………………….35,000                 Prepaid rent….………………………………….30,000                 Office equipment…………………………….....620,000                 Accumulated depreciation: equipment………...200,000                 Land……………………………………………750,000                 Accounts payable………………………………306,000                 Dividends payable……………………………… 50,000                 Interest payable…………………………………......
can you please solve this for me. please write a paragraph for each question and explain...
can you please solve this for me. please write a paragraph for each question and explain your reasoning. 1) assume that you are a full-time worker earning $10/hour, $80/day, $400/week, $20000/year. would you be willing to quit your jobs or keep working if the tax rate was 10%? 20%? 30%? 40%? what do you think is the best tax rate? what do you think is the best tax rate? 2)the state of California has decided to increase funding for public...
This is a three-part question. If you want it piecemeal, then let me know. a) Why...
This is a three-part question. If you want it piecemeal, then let me know. a) Why do CISC processors tend to use micro-programming? b) Why do RISC processors not use micro-programming? c) What is the main advantage provided by a micro-programmed system?
This is a three-part question. If you want it piecemeal, then let me know. Assume that...
This is a three-part question. If you want it piecemeal, then let me know. Assume that R31, R30, ... , R0 are the 32 ALU result bits output by our MIPS ALU. a) Write down a logic expression for the Z (zero) flag that indicates when the result is zero as a function of these 32 result bits. b) Write down a logic expression for an N (negative) flag that indicates whether the result is negative. c) Suppose that there...
Please answer in C++! Let me know if you have any questions about these. Program 1:...
Please answer in C++! Let me know if you have any questions about these. Program 1: For this program, imagine we want to track an object and detect if it goes off the left or right side of the screen (that is, it’s X position is less than 0 and greater than the width of the screen, say, 100). Write a program that asks the user for the starting X and Y position of the object as well as the...
Please let me know about the material structure and properties of Solar energy devices.
Please let me know about the material structure and properties of Solar energy devices.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT