Blog

Coursehelp
April 16, 2019
QUESTION : No Comments

(Solved) : Work Construction Firm Need Able Accurately Predict Compressive Strength Concrete Given Va Q30689271 . . .

You work for a construction firm who need to be able toaccurately predict the compressive strength of concretegiven variables including the concrete composition and itsage. You are aware that the relationship between thesedifferent components and the concrete strength is complex, howeveryou have been asked to investigate how well a simple linearregression model works for prediction. Using theprovided data given in the linkbelow (Concrete_Data.xls),develop models to predict:

1. Concrete strength from the single best indicatorvariable;

2. Concrete strength from all variables.

With the second model, determine if anyvariables are not contributing significantly to the model,and what impact removing these has on predictionperformance. Comment on the final model and itsaccuracy. You should draw on the unit content concerningcorrelation and regression toanswer this question (Provide a MATLAB code andvisualisations to justify your response.)

LINK TO FILE:https://www.dropbox.com/s/65vsy4gkm4uy6ab/Concrete_Data.xls?dl=0

Expert Answer


. . .

OR
OR

Have a Comment on this Question?

Questions viewed by other students


  • QUESTION : (Solved) : Code Well Documented High Level Comments Also Codes Include Synopsis Algorithm Used Perfor Q34283565 . . .

    You will modify the subroutine in mul.s, replacing the two instructions that reside there with your solution The Specification . The register %edi will contain the argurnent a. ·The register %esi will contain the argument b. . The register %eax will carry the return value, the product of a and b. . You may use registers %rax, %rcx, %rax, %rsi, %rdi, %r8, %r9, %r10 and %r 11 as scratch registers. i.e., you may modify their values without penalty. Plan your register usage accordingly! You may not modify the values of registers %rbx, %rbp, %rsp, %r12, %r13, %r14 and %r15. You may not modify the values of any external memory locations.

    Your code should be well documented with high-level comments.Also, your codes include a synopsis of the algorithm you used toperform the multiplication,please. Thanks!

    The code provided:

    a) mul.s

       .globl times
    times:
       mov %edi, %eax # remove these two lines before
       imull %esi, %eax # you start writing your code

       ret

    b)main.c

    #include <stdio.h>

    unsigned times(unsigned, unsigned);

    void main () {
    unsigned a = 6;
    unsigned b = 7;
    printf(“The product of %u and %u is %u. “, a, b, times(a,b));
    return;
    }

    We were unable to transcribe this imageYou will modify the subroutine in mul.s, replacing the two instructions that reside there with your solution The Specification . The register %edi will contain the argurnent a. ·The register %esi will contain the argument b. . The register %eax will carry the return value, the product of a and b. . You may use registers %rax, %rcx, %rax, %rsi, %rdi, %r8, %r9, %r10 and %r 11 as scratch registers. i.e., you may modify their values without penalty. Plan your register usage accordingly! You may not modify the values of registers %rbx, %rbp, %rsp, %r12, %r13, %r14 and %r15. You may not modify the values of any external memory locations. Show transcribed image text

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Code Want Always Execute Whether Exception Thrown Placed Block Try Catch Finally Program E Q30657048 . . .

    The code you want to always execute, whether an exception isthrown or not, is placed in the ____ block.

    try
    catch
    finally
    if

    If a program experiences an unhandled exception, the programterminates.

    True
    False

    All exceptions inherit from the base ____ class.

    SystemException
    Exception
    ApplicationException
    BaseException

    Run-time errors are typically easy to fix.

    True
    False

    Using the debugger built into Visual Studio allows you to placea marker that causes the code to pause execution. This is ____.

    an event
    a breakpoint
    a watch
    an exception

    The two types of errors are compile and run-time errors.

    True
    False

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Code Works Shell Doesn T Work Pico C Editor Cpp Compiler Errors Get Topdivarraycpp 81 71 M Q27656523 . . .

    so my code works in shell but doesn’t work in pico c++ editor.cpp compiler

    these are the errors i get:

    top_div_array.cpp:81:71: missing terminating ” character
    top_div_array.cpp:82:2: missing terminating ” character
    top_div_array.cpp: In function `void print_result(float*,std::string*, int)’:
    top_div_array.cpp:82: error: syntax error before stringconstant
    gen242@cs04:~>

    and this is my code:

    //poonam patel
    //cs 102 spring
    //calculates highest divisions sales using array and prototypesfunction

    //libraries
    #include <iostream>
    #include <string>
    #include <iomanip>
    using namespace std;
      
    //function prototypes
    void populate_div_sales(float[], string[], int);
    int findHighest (float[], int);
    void print_result(float[], string[], int);

    int main()
    {
    int top_div_index = 0;
    float div_sales[4];
    string div_regions[4];

    //arrays for regioons
    div_regions[0] = “Northeast”;
    div_regions[1] = “Southeast”;
    div_regions[2] = “Northwest”;
    div_regions[3] = “Southwest”;

    //function
    populate_div_sales(div_sales,div_regions,4);
    //debug
    cout<<“debug print for arraydiv_sales_array”<<endl;
    for (int i=0; i<4; i++)
    {
    cout<<div_sales[i]<<endl;
    }
    top_div_index = findHighest(div_sales,4);
    cout<<“debug fortop_div_index:”<<top_div_index<<endl;

    print_result(div_sales, div_regions, 4);

    return 0;
    }
    //division sales
    void populate_div_sales(float f_div_sales[], stringf_div_regions[], int size)
    {
    float sale;
    cout<<“Enter Division Sales for 4 regionsn”;
    for(int i=0;i<size; i++)
    {
    while(true)

    cout<<f_div_regions[i]<<“:$”;
    cin>>sale;
    if(sale>=0)
    {
    f_div_sales[i]=sale;
    break;
    }
    else
    {
    cout<<“sale should be positive integer, please tryagain…n”;
    }
    }
    }
    }
    //findinghighest
    int findHighest(float sales[], int size)
    {
    float greatestSalesAmount=0;
    int save_index=0;

    greatestSalesAmount=sales[0];
    for(int i=0; i<size; i++)
    {
    if(sales[i]>greatestSalesAmount)

    {

    greatestSalesAmount=sales[i];
    save_index=i;
    }
    }
    return save_index;  
    }

    //printresults
    void print_result(float f_sales[], string f_divisions[], intsize)
    {
    int highest=findHighest(f_sales,4);
    cout<<fixed<<setprecision(2)<<“Highestsale:”<<f_divisions[highest]<<“division whicchmade
    $”<<f_sales[highest];
    }

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Code Wont Compile Please Help Import Javautilarrays Import Javautilscanner Public Class Ar Q31189336 . . .

    05. Fifth Assignment - An Array Calculator In this assignment, you will make another calculator. This one will work on arrays rather than single values. Like the basic calculator from the previous assignments, the array calculator should allow users to add, subtract, multiply and divide the corresponding values in two arrays. It should also allow users to generate a random array. Finally there is a special value that can be computed for two arrays called the dot product that your calculator should also be able to compute. You can find the definition of the algebraic dot product of two arrays by googling (Wikipedia is a good choice). Briefly, the dot product of two arrays is the sum of the product of the corresponding values in the For example, the dot product of [1, 5, 8, 2] and [2, 4, 1, 3] is (1 2) + (5 4)(8 1+(2 3) which is 36 Your array should have the same methods as the calculator from Assignment 4, plus a method to compute the dot product. These methods should deal with double arrays rather than plain doubles, however. Here is a list of the method signatures public static int getMenuoption() public static double[] getOperand(String prompt, int size); public static double getoperand(String prompt); public static double[] add (double] operandl, double] operand2) public static double] subtract(double[] operand1, doublel] operand2) public static double[] multiply (double] operandl, double[] operand2) public static double[] divide (doublel] operand1, double] operand2) public static double] random (double lowerLimit, double upperLimit, int size) public static double dotProduct(double[] operand1, doublel] operand2) You will need two versions of the getOperand method. This is an example of method overloading. The first version will prompt the user for enough values to fill an array and return the array. This will be used to get the operands for the add, subtract, multiply divide, and dotProduct method. The other version does the same thing as in the Fourth Assignment Calculator with Methods - it displays a prompt and reads and returns a double value. This is needed to get the inputs for the random method. The random method will need one additional parameter- the size of the random array that should be generated. Note that the dotProduct method only needs to return a single double value rather than an array Here is an example run of the program: Menu 1. Add 2. Subtract

    my code wont compile please help.

    import java.util.Arrays;

    import java.util.Scanner;

    public class ArrayCalc {

    private static final double[] NaN = null;

    private static Scanner input;

    private static Scanner input2;

    private static Scanner input3;

    public static int getMenuOption() {

    input = new Scanner(System. in );

    int invalid = 0;

    while (invalid < 10) {

    // Menu list

    System.out.println(“”);

    System.out.println(” Menu “);

    System.out.println(“1. Add”);

    System.out.println(“2. Subtract”);

    System.out.println(“3. Multiply”);

    System.out.println(“4. Divide”);

    System.out.println(“5. Dot product”);

    System.out.println(“6. Generate Random Number”);

    System.out.println(“7. Quit”);

    System.out.println(“”);

    System.out.println(“What would you like to do?”);

    int menuOption = input.nextInt();

    if ((menuOption <= 7) && (menuOption > 0)) {

    return (menuOption);

    } else {

    System.out.println(“Sorry, ” + menuOption + ” is not anoption.”);

    invalid++;

    }

    }

    System.out.println(“Too many invalid inputs. Try againlater”);

    System.exit(0);

    return (0);

    }

    public static double[] getOperand(String prompt, int size) {

    return null;

    }

    public static double getOperand(String prompt) {

    System.out.println(prompt);

    input = new Scanner(System. in );

    return (input.nextDouble());

    }

    //Addition

    public static double[] addition(double[] operand1, double[]operand2) {

    double[] resultset = new double[operand1.length];

    for (int i = 0; i < operand1.length; i++)

    resultset[i] = operand1[i] + operand2[i];

    return resultset;

    }

    //Subtraction

    public static double[] subtraction(double[] operand1, double[]operand2) {

    double[] resultset = new double[operand1.length];

    for (int i = 0; i < operand1.length; i++)

    resultset[i] = operand1[i] – operand2[i];

    return resultset;

    }

    //Multiplication

    public static double[] multiplication(double[] operand1,double[] operand2) {

    double[] resultset = new double[operand1.length];

    for (int i = 0; i < operand1.length; i++)

    resultset[i] = operand1[i] * operand2[i];

    return resultset;

    }

      

    //Division

    public static double[] division(double[] operand1, double[]operand2) {

    if (operand2 != 0) {

    double[] resultset = new double[operand1.length];

    for (int i = 0; i < operand1.length; i++)

    resultset[i] = operand1[i] / operand2[i];

    return resultset;

    } else {

    System.out.println(“Divisor cannot be zero”);

    return (double. null);

    }

    //Dot Product

    public static double[] dotProduct(double[] operand1, double[]operand2) {

    double[] resultset = new double[operand1.length];

    for (int i = 0; i < operand1.length; i++)

    resultset[i] = operand1[i] + operand2[i] + operand1[i] *operand2[i];

    return resultset;

    }

    //Random

    public static double random(double lowerLimit, doubleupperLimit, int size) {

    double lower = getOperand(“What is the lower limit?”);

    double upper = getOperand(“What is the upper limit?”);

    double randomVal = ((double)(Math.random() * (upper – lower)) +lower);

    return (randomVal);

    }

    public static void main(String[] args) {

    input2 = new Scanner(System. in );

    double[] array1 = null;

    double[] array2 = null;

    int arraysize = 0;

    int menuOption = getMenuOption();

    while ((menuOption <= 7) && (menuOption > 0)){

    if (menuOption <= 5) {

    System.out.println(“How many values are in the arrays?”);

    arraysize = input2.nextInt();

    //1st array

    array1 = new double[arraysize];

    System.out.println(“Enter the values in the first array,separated by spaces: “);

    input2.nextLine();

    String number = input2.nextLine();

    for (int i = 0; i < arraysize; i++)

    array1[i] = Integer.parseInt(number.split(” “)[i]);

    //2nd array

    array2 = new double[arraysize];

    System.out.println(“Enter the values in the secound array,separated by spaces: “);

    number = input2.nextLine();

    for (int i = 0; i < arraysize; i++)

    array2[i] = Integer.parseInt(number.split(” “)[i]);

    }

    }

    if (menuOption == 1) {

    double[] results = addition(array1, array2);

    for (int i = 0; i < arraysize; i++)

    System.out.print(results[i] + ” “);

    menuOption = getMenuOption();

    } else if (menuOption == 2) {

    double[] difference = subtraction(array1, array2);

    for (int i = 0; i < arraysize; i++)

    System.out.println(difference[i] + ” “);

    //Subtraction

    menuOption = getMenuOption();

    } else if (menuOption == 3) {

    double[] product = multiplication(array1, array2);

    for (int i = 0; i < arraysize; i++)

    System.out.println(product[i] + ” “);

    //Multiplication

    menuOption = getMenuOption();

    } else if (menuOption == 4) {

    double[] quotient = division(array1, array2);

    for (int i = 0; i < arraysize; i++)

    System.out.println(quotient[i] + ” “);

    //Division

    menuOption = getMenuOption();

    } else if (menuOption == 5) {

    } else if (menuOption == 6) {

    double randomVal = random(array1, array2);

    System.out.println(randomVal);

    //Displays a random integer between an upper and a lowerlimit

    menuOption = getMenuOption();

    } else if (menuOption == 7) {

    System.out.println(“Goodbye!”);

    System.exit(0);

    }

    }

    private static double random(double[] array1, double[] array2){

    // TODO Auto-generated method stub

    return 0;

    }

    }

    05. Fifth Assignment – An Array Calculator In this assignment, you will make another calculator. This one will work on arrays rather than single values. Like the basic calculator from the previous assignments, the array calculator should allow users to add, subtract, multiply and divide the corresponding values in two arrays. It should also allow users to generate a random array. Finally there is a special value that can be computed for two arrays called the dot product that your calculator should also be able to compute. You can find the definition of the algebraic dot product of two arrays by googling (Wikipedia is a good choice). Briefly, the dot product of two arrays is the sum of the product of the corresponding values in the For example, the dot product of [1, 5, 8, 2] and [2, 4, 1, 3] is (1 2) + (5 4)(8 1+(2 3) which is 36 Your array should have the same methods as the calculator from Assignment 4, plus a method to compute the dot product. These methods should deal with double arrays rather than plain doubles, however. Here is a list of the method signatures public static int getMenuoption() public static double[] getOperand(String prompt, int size); public static double getoperand(String prompt); public static double[] add (double] operandl, double] operand2) public static double] subtract(double[] operand1, doublel] operand2) public static double[] multiply (double] operandl, double[] operand2) public static double[] divide (doublel] operand1, double] operand2) public static double] random (double lowerLimit, double upperLimit, int size) public static double dotProduct(double[] operand1, doublel] operand2) You will need two versions of the getOperand method. This is an example of method overloading. The first version will prompt the user for enough values to fill an array and return the array. This will be used to get the operands for the add, subtract, multiply divide, and dotProduct method. The other version does the same thing as in the Fourth Assignment Calculator with Methods – it displays a prompt and reads and returns a double value. This is needed to get the inputs for the random method. The random method will need one additional parameter- the size of the random array that should be generated. Note that the dotProduct method only needs to return a single double value rather than an array Here is an example run of the program: Menu 1. Add 2. Subtract Show transcribed image text 05. Fifth Assignment – An Array Calculator In this assignment, you will make another calculator. This one will work on arrays rather than single values. Like the basic calculator from the previous assignments, the array calculator should allow users to add, subtract, multiply and divide the corresponding values in two arrays. It should also allow users to generate a random array. Finally there is a special value that can be computed for two arrays called the dot product that your calculator should also be able to compute. You can find the definition of the algebraic dot product of two arrays by googling (Wikipedia is a good choice). Briefly, the dot product of two arrays is the sum of the product of the corresponding values in the For example, the dot product of [1, 5, 8, 2] and [2, 4, 1, 3] is (1 2) + (5 4)(8 1+(2 3) which is 36 Your array should have the same methods as the calculator from Assignment 4, plus a method to compute the dot product. These methods should deal with double arrays rather than plain doubles, however. Here is a list of the method signatures public static int getMenuoption() public static double[] getOperand(String prompt, int size); public static double getoperand(String prompt); public static double[] add (double] operandl, double] operand2) public static double] subtract(double[] operand1, doublel] operand2) public static double[] multiply (double] operandl, double[] operand2) public static double[] divide (doublel] operand1, double] operand2) public static double] random (double lowerLimit, double upperLimit, int size) public static double dotProduct(double[] operand1, doublel] operand2) You will need two versions of the getOperand method. This is an example of method overloading. The first version will prompt the user for enough values to fill an array and return the array. This will be used to get the operands for the add, subtract, multiply divide, and dotProduct method. The other version does the same thing as in the Fourth Assignment Calculator with Methods – it displays a prompt and reads and returns a double value. This is needed to get the inputs for the random method. The random method will need one additional parameter- the size of the random array that should be generated. Note that the dotProduct method only needs to return a single double value rather than an array Here is an example run of the program: Menu 1. Add 2. Subtract

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Code Written Java Declare Class Cobbolock Works Like Combination Lock Gym Locker Shown Lo Q27364931 . . .

    code should be written in java
    Declare a class CobboLock that works like the combination lock in a gym locker, as shown here. The lock is constructed with a combination-three numbers between 0 and 39. The reset method resets the dial so that it points to O. The turnLeft and trunRight methods turn the dial by a given number of ticks to the left or right. The open method attempts to open the lock. The lock opens if the user first turned it right to the first number in the combination, then left to the second, and then right to the third. Write a client program/code to thoroughly test the dlass. Take snapshots of your tests and include those with submission.Declare a class CobboLock that works like the combination lock in agym locker, as shown here.The lock is constructed with acombination – three numbers between 0 and 39. The reset methodresets the dial so that it points to 0. The turnLeft and trunRightmethods turn the dial by a given number of ticks to the left orright. The open method attempts to open the lock. The lock opens ifthe user first turned it right to the first number in thecombination, then left to the second, and then right to thethird.Write a client program/code tothoroughly test the class. Take snapshots of your tests and includethose with submission.Declare a class CobboLock that works like the combination lock in a gym locker, as shown here. The lock is constructed with a combination-three numbers between 0 and 39. The reset method resets the dial so that it points to O. The turnLeft and trunRight methods turn the dial by a given number of ticks to the left or right. The open method attempts to open the lock. The lock opens if the user first turned it right to the first number in the combination, then left to the second, and then right to the third. Write a client program/code to thoroughly test the dlass. Take snapshots of your tests and include those with submission. Show transcribed image text Declare a class CobboLock that works like the combination lock in a gym locker, as shown here. The lock is constructed with a combination-three numbers between 0 and 39. The reset method resets the dial so that it points to O. The turnLeft and trunRight methods turn the dial by a given number of ticks to the left or right. The open method attempts to open the lock. The lock opens if the user first turned it right to the first number in the combination, then left to the second, and then right to the third. Write a client program/code to thoroughly test the dlass. Take snapshots of your tests and include those with submission.

    Expert Answer


    . . .


    view full answer