MSE 280 C++,Python

Java Python AME 209/MSE 280
Studio 7 Fall 2024
Complete this problem, and turn in your work through D2L, preferably by the end of class,
but no later than 7:00 PM the day of lecture. Prepare your solutions in electronic form.
Two files are needed in order to complete the Studio 7 assignment. Name all of your files
in this format:
studio_07_xx.pdf
studio_07_xx.m
Your task is to modify your Matlab script from Homework 5. As before, your program will
plot a set of data. Your script will do the following (many items are unchanged from
Homework 5):
1. Asks the user to enter the name of a data file; the input is checked for errors, and
up to four tries are allowed (otherwise the program terminates).
2. Read the data file and determine if the x-y data is stored as rows (a matrix with
two rows) or as columns (a matrix with two columns). If rows, the x data is in row
1, the y data in row 2; if columns, the x data is in column 1, the y data in column 2.
If the data file is not in one of these formats an error message is displayed.
3. Use a menu along with switch/case statements to allow the user MSE 280、C++,Python to select the plot
symbol (choose one of star, square, circle, diamond).
4. After the plot symbol is chosen, a user input determines the color of the symbol
(using if/elseif/else statements). The script checks for user input error.
5. Ask the user to enter a plot title and labels for the x- and y-axes.
6. Using the Matlab subplot command, create a figure containing three plots of the
data on the screen. The first is a linear plot, the second a semilog plot, and the third
a log-log plot. Once the data is plotted, the program pauses so the user can view
the plots. The program resumes when the user hits any key.
For the semilog and log-log plots, you need to filter the data to deal with zero and
negative value points where the logarithm is undefined. Both the plots and the
exponential/power-law curve fitting routines will use only the filtered data.
7. The user can re-run the above with a new set of data.
Test your program by using three sets of data:
hw07_data01.dat
hw07_data02.dat
hw07_data03.dat
Plot each of these with representative fits         

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值