Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.

Get a Professional Answer

Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.

100% Satisfaction Guarantee

Rate the answer you receive.

Ask R.R. Jha Your Own Question

R.R. Jha,
Tutor

Category: Homework

Satisfied Customers: 5444

Experience: B.Tech

20870358

Type Your Homework Question Here...

R.R. Jha is online now

Excel 2010 Visual Basic Homework Help
Problem 1:
Hurricanes

Resolved Question:

Excel 2010 Visual Basic Homework Help

Problem 1: Hurricanes are categorized based on wind speeds. Use the following table to write a (VB) script that will prompt the user for the wind speed, and will print the hurricane category number and the typical storm surge.

Problem 2: Write the program in (VB) of a temperature conversion (temperature input in K to a temperature output in °C or °F). The inputs are: input1 is a number, input2 is a letter that is either "C" or "F" to represent Celsius and Fahrenheit, respectively. Deal with the possibility when the user gives the second input in small letter, or an invalid temperature unit. Also, consider when the user gives a negative number for input1!

Problem 3: Write a program in (VB) to determine if a given integer input: intYear, is a leap year or not.

Hint: For #3, use the built-in function mod in VB.

Pseudocode to determine whether a year is a leap year or not in either the Gregorian calendar since 1582 or in the proleptic Gregorian calendar between 1 and 1582:

if year is divisible by 400 then is_leap_year else if year is divisible by 100 then not_leap_year else if year is divisible by 4 then is_leap_year else not_leap_year

Ok, here are two problems. Take a look at them and see if you can help. If you can I would need them around 12:00 central time tommorrow and we can negotiate a price. Thanks.

1. Write the program in Matlab and Excel Visual Basic:

The distance between any two points (X1,Y1) and (X2,Y2) is give by,

distance = squareroot((x1-x2)^2+(y1+y2)^2)

the area of a triangle is ,

area = squareroot(S*(S-A)*(S-B)*(S-C))

where A,B, and C are the lengths of the sides of the triangle, and S is equal to half of the sum of the three sides of the triangle. Write a script that will prompt the user to enter the coordinates of the three points that determine a triangle ( the X and Y coordinates of each point). The script will then calculate and print the area of the triangle. it will call one function to calculate the area of the triangle. This function will call a sub-function that calculates the length of the side formed by any two points (the distance between them).

2. Create in programming language of your choice a function called isLeapYear(intYear) that determines if the input year is a leap year or not. Write the main program to calculate the total days passed in a year for a given date. Prompt the user for the (integer) inputs: year, month, and day. The output is the total days passed since Jan 1st of that year excluding the input date (e.g., if the user gives 2012, 01, 23, then the output is 22). Call the function isLeapYear(intYear) to determine if the year is leap or not, if necessary.

Assumption: The user is intelligent enough to enter valid dates only. Example of invalid dates (yyyy/mm/dd): 2001/01/32, 2002/02/29 (2002 is non-leap), 2005/04/31 (April has only 30 days), etc. Tackling invalid dates is for Project #1. However, if you insist to deal with invalid dates in this HW, it will worth maximum 10 extra pts, by creating another function to check the validity of the input date before calculating the total days passed. Name the function isValidDate(intYear, intMonth, intDay).

For checking: Use built-in function DateDiff in VB to check your work. Note that the function DateDiff must be used for checking ONLY.

Expected I/O: Enter year: 2012 Enter month: 3 Enter day: 15

Could you please clarify which programming language these need to be in? Because first one states Matlab and Visual Basic, while second one says programming language of your choice?

Yes, the first question wants the programming language in both VB and Matlab. The second one can be in either VB or Matlab but if you could do it in Matlab would work best for me. Anything else you need to know?

I know I posted my question Tuesday saying I needed it tomorrow (Wednesday) around noon central time. By the end of our conversation it was Wednesday (today) and I am just trying to confirm the date of which I need the assignment. I can have it as late as 3Pm central or 4pm EST today.

Sorry if I confused you but hopefully you understood my original time request. Thanks

Ok, thanks for the help. I don't have matlab on my computer and must go on campus to test the program. I will get back to you in a few hours and let you know how it goes. I will talk to you soon.

It can happen if the points are collinear, that is, all three points are in a straight line. Please make sure it isn't so. Here is an online calculator I found to cross check with

Hello, I have some more things I could use some help on. I would need this by Friday around 5pm EST. I would like to know what you think.

Problem 1) Write the following code in Matlab and VB:

Hints: VB: Left, Right, InStr, Replace;

Matlab: strfind, strtok, strrep

Words in a sentence variable (just a string variable) called mysent are separated by right slashes (/) instead of blank spaces. For example, mysent might have this value:

'This/is/not/quite/right'

Write a function slashtoblank that will receive a string in this form and will return a string in which the words are separated by blank spaces. This should be general and work regardless of the value of the argument. No loops are allowed in this function; the built in string functions must be used.

>> mysent = 'This/is/not/quite/right';

>> newsent = slashtoblank(mysent)

newsent =

This is not quite right

Problem 2) With yesterdays homework you helped me with convert problem 2 to VB (you did that in Matlab) and by altering both the VB and Matlab code by,

2.1) By employing array vector in VB or a vector matrix in Matlab.

AND

2.2) By having Inout/Output as one line of string, with expected I/O:

Hello, I have some more work for you if your interested. I would need them by tommorrow night (Tuesday) before midnight 12:00 AM EST.

Question 1) Write the following program in MATLAB.

For a bio-medical experiment, the names and weights of some patients have been stored in a file named patwts.dat. For example, the file might look like this:

Darby George 166.2

Helen Dee 143.5

Giovanni Lupa 192.4

Cat Donovan 215.1

Create this data file first. Then, write a script readpatwts that will first attempt to open the file. If the file open is not successful, an error message should be printed. If it is successful, the script will read the data into strings, one line at a time. Print for each person the name in the form 'last,first' followed by the weight. Also, calculate and print the average weight. Finally, print whether the file close was successful. For example the results of running the script would look like this:

>> readpatwts

George,Darby 166.2

Dee,Helen 143.5

Lupa,Giovanni 192.4

Donovan,Cat 215.1

The average weight is 179.30

File close successful

Question 2)

Write the program in Matlab and VB, to calculate a root of a given formula and two initial conditions using Modified Secant method. In the program:

2.1. The formula should be given by the user as a string. Use the built-in function eval in Matlab, or Evaluate in VB to calculate the string expression.

2.2. Save the information in an output file for Matlab, printed to worksheet for VB, with the following format:(with [xxx] is the inputs from the user for each prompt)

Just noticed that Question 2 is inputting two initial condition but Modified Secant method uses only one initial condition (but Secant method uses two). Let me know which one to program for question 2.

Hello, thanks for the on time delivery. I just have some general questions over the software. Can you give me a brief lesson on how to use/run these programs and how they work?

Hello, I have one more assignment for you. It involves creating a GUI in Visual Basic. I will receive extra credit for creating the same GUI in Matlab. Take a look at the parameters below an when do you think you have this done?

1. Write a GUI program in Visual Basic to calculate the time elapsed in between two specified instances to mimic VB’s (limited) DateDiff function.

2. Prompt the user two inputs of time instances in the format of:

Inputs:

Year: [in text box format]

Month: [in combo box or option button format]

Day: [in combo box format]

Hour: [in combo box or option button format]

Minute: [in combo box format]

Second: [in combo box format]

And a choice of time difference type:

Difference type: [in combo box or option button format with choices: Year, Month, Day, Hour, Minute, Second]

[Button: Calculate]

[Button: Close form]

Output(s):

[Label: Time difference = {#} {unit asked from Difference type}]

Optional: [Label: Time difference using DateDiff function = {#} {unit asked from Difference type}]

The only difference between your program and DateDiff is that in your program you have to deal with input where Time 1 > Time 2, while DateDiff gives negative number for the result.

3. 1 year = 366 days in leap year, otherwise 365 days. Inputs are limited between 2001/01/01 00:00:00 to 2999/12/31 23:59:59

4. Use the functions to determine leap year and determine days passed within a year in previous assignments to calculate the total days between the two dates.

5. Program should be written based on the materials that have been covered in the class: See below;

I could do this in Matlab. I should be able to finish it by Sunday, but let me know if it's due later. Hope you could add $50 as bonus, as this is bigger project.

Ok, I'll send it before Tuesday. I can do them in both VB 2010 and Matlab, but that would be lots of work. If you're fine with adding $120 as bonus, I'd do them in both languages.

THIS ANSWER IS LOCKED! You can view this answer by clicking here to Register or Login and paying $3. If you've already paid for this answer, simply Login.

Ok, thank you for your help. The programs run fine now. I will be looking over the actual programming in more detail over the next day or so and if i have any questions ill be sure to ask you.

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.

JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.

Web sites like justanswer.com/legal ...leave nothing to chance.

Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.

Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.

I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C.Freshfield, Liverpool, UK

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. RobinElkton, Maryland

He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here.DianeDallas, TX