MATLAB 2017b
i know i didnt post the data file "exam_data.txt" hypothtically how would i do this problem with access to the file
Download the file “exam_data.txt” from Black Board (or your email) to your directory.
Read the file into 13 by 7 array
Find the largest and smallest number in the array
Write these two results into a file and name the file:
lastname_firstname_exam2_problem1_output_file.txt
Make sure that your problem checks the reading and writing operations.
Code: -
fileID = fopen('exam_data.txt','r'); % open file in read
mode
formatSpec = '%f'; % format of the data to read
sizeA = [13 7]; % shape of output array
A = fscanf(fileID,formatSpec,sizeA); %Read the file data, filling
output array, A, in column order
fclose(fileID);
max_value = max(max(A));
min_value = min(min(A));
kk=[max_value min_value];
file_name
="lastname_firstname_exam2_problem1_output_file.txt";
fileID1 = fopen(file_name,'w'); % open file in write mode
fprintf(fileID1,'%f %f',kk); % write variable in file
fclose(fileID1);
Output:-
I can not show output because you have not post the exam_data.txt
MATLAB 2017b i know i didnt post the data file "exam_data.txt" hypothtically how would i do...
I know there is a similar problem answered but it didnt quite work for me. Can i have in in windows form please. i really dont understand this one Sales analysis Modify the application that you created in programming exercise 1 so it also displays the following: Average values in the array Largest Value in the array Smallest Value in the array
Download the Array.mat file and save it in your current MATLAB directory (make sure it is in the correct folder). At the command prompt, type >> load Array. Look in your workspace window. You should see a 1-d array called vector (1x12), and a 2-d array called matrix (10x5). All of the following problems refer to the arrays vector and matrix downloaded from the Array.mat file. Don’t change the values in vector or matrix unless prompted. If you do inadvertently...
How do I correct this error in my code?
When it got to the file type I can only go "null" from a certain
point and I'm wondering how to correct this error.
Also can I get a word document on this coding strategy for this
problem? How much of this am I doing correctly?
The original problem description:
Create a program that provides a listing of all the files in a
directory. The program should be a Java application...
How
can I read a file and use the content to find the answer?
3. Write a MatLab program that reads in the set of values in the file "Values.txt" which is available from the d2l website. The values are stored as ASCII text separated by carriage returns, so you can open the file and look at the valucs yourself by double clicking on the file name in MatLab's Current Directory window. Your program should next calculate and print out:...
How
can I read a file and use the content to find the answer?
3. Write a MatLab program that reads in the set of values in the file "Values.txt" which is available from the d2l website. The values are stored as ASCII text separated by carriage returns, so you can open the file and look at the valucs yourself by double clicking on the file name in MatLab's Current Directory window. Your program should next calculate and print out:...
How
can I read a file and use the content to find the answer?
3. Write a MatLab program that reads in the set of values in the file "Values.txt" which is available from the d2l website. The values are stored as ASCII text separated by carriage returns, so you can open the file and look at the valucs yourself by double clicking on the file name in MatLab's Current Directory window. Your program should next calculate and print out:...
How
can I read a file and use the content to find the answer?
3. Write a MatLab program that reads in the set of values in the file "Values.txt" which is available from the d2l website. The values are stored as ASCII text separated by carriage returns, so you can open the file and look at the valucs yourself by double clicking on the file name in MatLab's Current Directory window. Your program should next calculate and print out:...
There is a file called mat2.txt in our files area under the Assignments folder. Download it and save it in the same folder where this Matlab file (HW08_02.m) is saved. It may be worth opening that text file to see how it is set out. Note well, however, that the file might have a different number of lines and different number of numbers on each line. Write a Matlab program that does the following: Prompt the user for an input...
Hi I how do i use a vector to search a array for a string that user has enter into the console. here is some of the instructions for the programing I am trying to work on The purpose of this program is to write a class whose job is to read up to 10,000 names into a string array. The class sorts the names and then the user can ask the class to find full names containing a name...
Need this in C
The starter code is long, if you know how to do it in other way
please do.
Do the best you can please.
Here's
the starter code:
//
-----------------------------------------------------------------------
// monsterdb.c
//
-----------------------------------------------------------------------
#include
#include
#include
//
-----------------------------------------------------------------------
// Some defines
#define NAME_MAX 64
#define BUFFER_MAX 256
//
-----------------------------------------------------------------------
// Structs
typedef struct
{
char name[NAME_MAX];
int hp;
int attackPower;
int armor;
} Character;
typedef struct
{
int size;
Character *list;
} CharacterContainer;
//
-----------------------------------------------------------------------
//...