Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a script to create the three row character array of table headings for a loan payment options table as shown below and assign to
Write a script to create the three row character array of table headings for a loan payment options table as shown below and assign to a variable named TableHeadings, The character array should be 3 rows and 72 characters wide. The title "Monthly Payment Table" starts in the 25th column. The column headings "Interest Rate" and "20 Year Term' start in columns 1 and 50 respectively. The picture below shows how it would look when printed to the command window. 3x72 char array Monthly Payment Table 'Interest Rate 20 Year Term Script C Reset MATLAB Documentation 1 create a 3x72 array of spaces 2 TableHeadings = 32 ~ ones (3,72); 3 assign the title at the correct spot in the first row 4 title = 'Monthly Payment Table'; 5 % the length has to go to the starting index + length of character array - 1 for the dimensions to match! 6 TableHeadings (1, 25:25 + length{title) - 1) = title; 7 % make the column header for the interest rate & interestLine = 'Interest Rate'; 9 TableHeadings (3, 1: 1 + Length( ) - 1) = interestLine; 11 % make the column header for the 20 year term 12 twentyYear = '20 Year Term'; 13 TableHeadings (3, 50: 50 + length(twenty Year) - 1) =
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started