Question
You want to use Matlab to generate .html files that can be viewed by a regular browser to report students marks. Write a simple Matlab
You want to use Matlab to generate .html files that can be viewed by a regular browser to report students marks. Write a simple Matlab script (about 10-20 lines) that does that. Name your script htmlmark.m
.
Html files contain a lot of extra information other than what is displayed on the web page. You do not need to understand what all these symbols mean. Have a look at this example. To view the actual html click ctrl-U (hold down the control key on your keyboard and pres the "u' key) while your mouse pointer is in the page.
Your script should start with a header containing a brief description of it and your name and date. The first thing your script does is assign a variable named Mark
the mark of the particular student (e.g. 88.4). It then opens a file named mark.html
and writes in it with one fprintf
statement for each line all the html things needed (they look like gibberish, but this is what html looks like). Be careful with the % symbol. One of these fprintf
statements uses a formatting directive to print the Mark
with 6 digits altogether and 2 digits after the decimal point. Do not forget to close the file after the last fprintf
statement.
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