Question

Examine the following Loops in MATLAB statements. Are they correct? If yes, put zero (0) and record the output 7 in the blank
0 0
Add a comment Improve this question Transcribed image text
Answer #1

#the code syntax is not correct intially and middle some where not correct systax

c=zeros(1,7);

this is correct syntax for line 1 so line one gives an error and middle line also follow wrong syntax so compiler gives the first invaid syntax error which is first line in the code

one(1)

and line number error also 1

#code:

;(c=zeros(1,7
for y=1601:2000
for m=1:12
;(d=datenum(13
;(w=weekday(d
;c(w)=c(w)+1
;{}=d{};d
end
end

>> data parse error near line 1 of file /home/user/data.m syntax error >>> ; (c-zeros(1,7 >> |

#actually datenum takes  [YEAR, MONTH, DAY, HOUR, MINUTE, SECOND] this kind of seqeunce than only it give s exact output

#If you have any dount or more information needed comment below..i wil respond as possible as soon..thanks,,

Add a comment
Know the answer?
Add Answer to:
Examine the following Loops in MATLAB statements. Are they correct? If yes, put zero (0) and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Complete the MATLAB code - image convolution: - Implement image convolution in Matlab: -- Apply the following kernels and compare their images -- If output is less than zero, set it to zero -2 10 151...

    Complete the MATLAB code - image convolution: - Implement image convolution in Matlab: -- Apply the following kernels and compare their images -- If output is less than zero, set it to zero -2 10 151 0 10 0 1 0 clear % Read image A-int32 (imread ( [N, M]-size (A) % change unsigned to signed integer for matrix computation %-define convolution kernel L= 1; % half size of kernel % initialize kernel data = zeros (2*1+1,2*1+1) ; 88%%%%%%%%%88%88% build...

  • For each of the below codes, determine if the following MATLAB codes produces an error. •...

    For each of the below codes, determine if the following MATLAB codes produces an error. • If the code does NOT produce an error, predict the output. • If the code DOES produce an error: (1) state what line the FIRST error is found and what the error is ICE08B-1: clear;clc SICE08B-1 A = [1,5,2,9,4,9]; B(1,5) = 0; counter = 1; for i = 1:length(A) B(1) = A(i) * counter; B(1) = B(i)-2; counter = counter + 1; end ICE08B-2:...

  • QUESTION 42 In Matlab, all arrays start at position zero. O True O False QUESTION 43...

    QUESTION 42 In Matlab, all arrays start at position zero. O True O False QUESTION 43 In C, the expression x=2 is used to compare if the value of x is equal to the value of 2, and the expression x==2 is used to assign the value of 2 to x. O True O False QUESTION 44 What is the C and Matlab function used to open an input file? Hint: This is a single word. Spelling and syntax must...

  • Balance the following redox equation in acid. In the blank put the correct stochiometric coefficient (0,...

    Balance the following redox equation in acid. In the blank put the correct stochiometric coefficient (0, 1, 2, etc.). (Note: 0 if the species does not appear on that side of the equatio 1-SO3-(ag)+MnO4-(ag)+H+(ag)---->SO4^2-(ag)+Mn2+(ag)+H2O(l) 2- H2O2(ag)+ClO2(ag)+HO-(ag)---> O2(g)+ClO2-(ag)+H2O(l) Q: In the electrochemical voltaic cell using the reaction, Fe3+(aq) +  Cr(s) → Fe(s) + Cr3+(aq), match the correct 1/2 reaction that occurs at the anode and cathode. 1/2 reaction occuring at the anode 1/2 Reaction occuring at the cathode Choices: A Fe3+(aq) +...

  • 7. Which of the following statements is (are) correct? (x) Suppose government debt equaled zero until...

    7. Which of the following statements is (are) correct? (x) Suppose government debt equaled zero until three years ago. In the last three years government had a budget deficit of $80 billion in each of the first two years and a budget surplus of $70 billion in the last year. At the end of the last year, the government had debt of $90 billion. (y) When the U.S. government is in debt, it follows that they have a deficit for...

  • Which of the following statements is CORRECT? a.   A stock with a beta of -1.0 has...

    Which of the following statements is CORRECT? a.   A stock with a beta of -1.0 has no risk if it is in a 1-stock portfolio. b.   By definition, all stocks in the market have the same level of market risk. c.   Portfolio diversification reduces the variability of returns on an individual stock. d.   If you diversify completely and hold all the stocks in the market, your portfolio will have a standard deviation equal to zero. e.   The SML relates a...

  • 12. if x = 0x25 then which of the following statements is correct a) if y...

    12. if x = 0x25 then which of the following statements is correct a) if y = x | (1<<1) then y is 0x26 b) if y = x << 1 then y is 0x4A Review questions COMP 2401 Fall 2019 Page 4 of 14 c) if y = x & 0x37 then y is 0x35 d) if y = x | 0x37 then y is 0x35 e) All of the above statements are incorrect 13. What will be the...

  • Which of the following statements regarding regression and correlation are true? (There may be more than...

    Which of the following statements regarding regression and correlation are true? (There may be more than one correct answer.) a. A value of the linear correlation, r, near -1 means the data is tightly bundled around a line, and predictions within the scope of data are very reliable. b. When the slope of a linear regression equation is near 0, then the linear correlation between the two variables must also be near 0. c. The average error between the actual...

  • MATLAB - Simulink Solution U 005) Esin - M = 2kg; m= 0.1 kg; l= 0.5m...

    MATLAB - Simulink Solution U 005) Esin - M = 2kg; m= 0.1 kg; l= 0.5m I cos e M 8:Pendulum Angle 8:Angular velocity of pendulum x:Position of the car *:Velocity of the car The linear model of the system is introduced by following equations 0 = 20.6010 - u x = 0.5u - 0.49050 Suppose states of system are x = [o o 0 1 001 20.601 0 0 0 A ;C = [0 0 1 0] 0 0...

  • Which of the following statements is/are correct? 1. The principal but not the interest to be paid this year on a 30-yea...

    Which of the following statements is/are correct? 1. The principal but not the interest to be paid this year on a 30-year mortgage is properly       classified on the Statement of Financial Position as a current liability. 2. A CD with a maturity of 9-months is classified as an investment asset on the Statement of       Financial Position. Select one: a. a.   1 only. b. b.   2 only. c. c.   Both 1 and 2. d. d. Neither 1 nor 2. Question 12...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT