** Please provide a code in MATLAB **
1. Write a function called taxcalculator that reads an amount in dollars, adds tax based on the table below and return the total with tax using elseif statement.
2. Write a function called printstars that
reads the number of rows and returns a triangle of stars similar to
the one below:
*
**
***
****
*****
******
*******
********
2.
CODE
=============
row=input('enter number of rows: \n');
for i= 0:row-1;
for j=row-i:-1:2
fprintf(' ')
end
for k=0:i
fprintf('* ')
end
fprintf('\n')
end
NOTE: In order to answer part 1, you would need to provide me the table to calculate the tax. Please post part 1 separately along with the table and I will try to answer it.
** Please provide a code in MATLAB ** 1. Write a function called taxcalculator that reads...
Please provide MATLAB code and comments! Please provide MATLAB code and comments! Please provide MATLAB code and comments! Question #5. Write a script that creates a variable called BALANCE that is assigned the value 100.00. Then prompt the user to enter an amount to withdraw. Store that amount in a variable called WITHDRAW. Use an if/else construct to display a message to the user stating whether the withdrawal was successful. If the withdrawal would result in a negative balance, state...
Please write in MATLAB code: 1. Write a function called myMin4 that will take in four numbers and returns the minimum value. You may NOT use the built-in min() function. Run the function for the following: myMin4(4, 8, 12, 15) myMin4(18, 9, 1, 6) myMin4(8, -2, 2, 10) 2. Write a function called classAverage that takes in an array of numbers and returns the letter grade of the class average. The grade ranges are as follow: Average >90 = A...
question on matlab. this is for a function. the question is "write a function called tri_area that returns the area of a triangle with base b and height h, where b and h are input arguments of the function in that order "
C++ ( Please Read) Write a function prototype and a function definition called getTotal that receives an array of type double, the number of rows in the array. It returns the total of all elements in the array.
*Please write in code in C* First, write a function called prime_check(int x) that takes an integer number as an input then return 1 if it is a prime number nd returns 0 if it is a composite number Then, Write a program that prompt the user to input two numbers: Print the multiplication of these two numbers if both of them are prime. Or Print " Sorry at least one of your number is composite" if otherwise
Matlab a) Write a MATLAB code that takes the grade letters from the user and provide him/her with the GPA for that semester Enter your grades (letters): AABBC (input) Your GPA is 3.2 output) b) Write a Matlab user defined function to that takes a letter grade and return a numeric grade as shown in the table below. Any other value should give an error message (Invalid Grade). You function name should be Letter2Grade Use the following information to calculate...
PLEASE USE MATLAB AND LOOP STATEMENTS TO SOLVE THE FOLLOWING PROBLEM: Write a function called palindrome that receives a whole number as input and returns true if the number is palindromic, and returns false otherwise. Recall that number is palindromic if it remains the same when the order of its digits is reversed. Examples of palindromic numbers are: 7, 44, 191, 3883, 25052, 617716.
12.22 Draw the Bode plot for the network function, IN MATLAB, please provide MatLab code for the work and screenshots of the Bode Plot
USING MATLAB...Write a function that creates a structure variable called createSpacecraft. The function should take four inputs, a number called mass (in kg), a number called fuel (in joules of energy), a number called orbit (in meters), and a number called engine (in newtons). It should return an output structure called spacecraft containing each of those values. Please ensure that both the function name, AND the names of variables within the spacecraft structure are exactly as instructed
Please write a short code that opens a text file called "data.txt" and reads, writes, and keeps writing data to the file in vb.net.