Vb and matlab to calculate the cumulative days

Assignment Help MATLAB Programming
Reference no: EM13165059

Create a function TotalDaysMonth(intYear, intMonth, strIndOrCum) in both VB and Matlab to calculate the cumulative days or number of days in a given month, depending on inputs, by employing array vector in VB or a vector matrix in Matlab.

------------- In VB:

Function TotalDaysMonth(intYear, intMonth, strIndOrCum)

DaysInMonth = Array(31, 28, 31, 30, ...)

. . .

If strIndOrCum = "I" Then

. . .

ElseIf strIndOrCum = "C" Then

. . .

Else

. . .

End If

. . .

End Function

-------------- In Matlab:

Function TotalDays = TotalDaysMonth(intYear, intMonth, strIndOrCum)

DaysInMonth = [31, 28, 31, 30, ...];

. . .

if strIndOrCum == 'I'

. . .

elseif strIndOrCum = 'C'

. . .

else

. . .

end

. . .

end

Note:

1. Matlab: Starting index of a row vector is 1. VB: Starting index of a row vector = 0.

2. You need to call function isLeapYear(intYear) to adjust the output if necessary.

1.2. By having the input as one line of string, combining the year, month, and day; with the expected I/O: (with {xxx} is the input for the prompt)

====================

Enter date: {2012/03/15}

Total day passed in 2012 before 3/15 = 74 days

Reference no: EM13165059

Questions Cloud

Draw an event-graph of a distributed system : Draw an event-graph of a distributed system of three concurrent processes which are communicating messages, and synchronized by their respective logical clocks
Interacting with customers on a regular basis : Social critics have maintained that marketing leads people to buy products they do not want and do not need. However, the failure rate of new products that are heavily marketed is reportedly as high as 80 percent. How can these two seemingly opposite..
Program calculates and displays salesperson''s commission : The sales manager at Tompkins Company wants a program that calculates and displays each salesperson's commission, which is 10% of his or her sales. It also should display the total commission. Use a value-returning function to get the amount sold by ..
Identify the incorrect names or formulas : Identify the incorrect names or formulas.
Vb and matlab to calculate the cumulative days : Create a function TotalDaysMonth(intYear, intMonth, strIndOrCum) in both VB and Matlab to calculate the cumulative days or number of days in a given month, depending on inputs, by employing array vector in VB or a vector matrix in Matlab.
How many moles of oxygen gas were evolved : A test tube containing a mixture of KCl, KClO3, and MnO2 having a total weight of 23.584 g was heated to compose the KClO3. After heating, the mass was found to be 22.347 g.
The program should allow the student : The program should allow the student to enter the answer. If the answer is correct, a message of congratulations should be displayed. If the answer is incorrect, a message showing the correct answer should be displayed.
Prepare a schedule in good form : Prepare a schedule in Good Form that determines Citrine's taxable income for State X purposes and calculate the amount of Federal income tax, if any, for Repair Habitat and for Concrete Pour.  Show your calculation in good form.
Find the mass of sodium required to produce : Find the mass of sodium required to produce 5.68 L of hydrogen gas at STP from the reaction described by the following equation: 2 Na + 2 H2O ® 2 NaOH + H2

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finds the largest integer in the list recursively

Write a program that, given a list of 20 integers, finds the largest integer in the list recursively

  Function that will use the secant method to try to find

Create a function that will use the Secant method to try to find a root. (Hint modify the posted version of False Position.) Because this method may diverge

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Write a script to solve the following systems of equations

Write a script to solve the following systems of equations using both matrix left division (\) and the inverse matrix method and Show that you have tested your MATLAB code appropriately

  Compute and plot 4 mean temperature profiles

Generate by measdata.m an array A withsize (365,24), containing temperature measurements for an entire year [1 January,..., 31 December], 24 hours a day [00.00h,...,23.00h].

  Create a matlab program

Create a MATLAB program that will use MATLAB's fzero function to determine d for the following parameters: R = 0.5 m and in steps of 0.1. Create a table consisting of S and d .

  Design and fir filter in matlab

What does the pole-zero diagram tells you about the filter

  Design and explain a computer-based simulation model

Design and explain a computer-based simulation model which you will use to estimate the probability that among 25, 50, 75, 100, 500, or 1000 randomly chosen people, at least 2 people share the same birthday.

  Implement linear support vector machine to classify data

code to implement linear Support vector machine to classify data (without using matlab built in function).

  Kerfuffleboard is a game very much like shuffleboard

Kerfuffleboard is a game very much like Shuffleboard. Players take turns shooting disks at a trianglular scoring area. While the scoring areas are the same in shuffleboard and kerfuffleboard, a disk's contribution to a player's score will be calcu..

  Computes the stiffness matrix for one bilinear element with

write Matlab code that computes the stiffness matrix for one bilinear element with 4 nodes

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd