I\'m just starting to use MatLab and am using it to analyze data fora lab projec
ID: 3617355 • Letter: I
Question
I'm just starting to use MatLab and am using it to analyze data fora lab project. The command line interface is causing me somedifficulty. Basically, I've been struggling with it and for thelife of me have not been getting anywhere. I'd appreciate somehelp.A file called mod.m and a data file called class.mat weregiven to us. The data file contains a 10x10 array of numbers thatcorrespond to the pixels for the image we are supposed to analyze.The numbers range from a background noise of about 2000 to almost10,000.
The .m file is supposed to give A, B, C, D as output with z,x, y, noiseamount as input where z is the array. Thus,[A,B,C,D]=mod(z,x,y,noiseamount).
The .m file says for x and y that this matrix or vector issupposed to have the same size as does z, & each element givesthe x- (or y-) coordinate for the pixel that corresponds to it.Then it says they should be in column form and has a couple linesthat follow: x=x(:); y=y(:); Z=z(:)+1e-10;
Then the rest of the code is the actual fitting that it does.How do I get this thing to work in the command line???????????Please help!
A file called mod.m and a data file called class.mat weregiven to us. The data file contains a 10x10 array of numbers thatcorrespond to the pixels for the image we are supposed to analyze.The numbers range from a background noise of about 2000 to almost10,000.
The .m file is supposed to give A, B, C, D as output with z,x, y, noiseamount as input where z is the array. Thus,[A,B,C,D]=mod(z,x,y,noiseamount).
The .m file says for x and y that this matrix or vector issupposed to have the same size as does z, & each element givesthe x- (or y-) coordinate for the pixel that corresponds to it.Then it says they should be in column form and has a couple linesthat follow: x=x(:); y=y(:); Z=z(:)+1e-10;
Then the rest of the code is the actual fitting that it does.How do I get this thing to work in the command line???????????Please help!
The .m file is supposed to give A, B, C, D as output with z,x, y, noiseamount as input where z is the array. Thus,[A,B,C,D]=mod(z,x,y,noiseamount).
The .m file says for x and y that this matrix or vector issupposed to have the same size as does z, & each element givesthe x- (or y-) coordinate for the pixel that corresponds to it.Then it says they should be in column form and has a couple linesthat follow: x=x(:); y=y(:); Z=z(:)+1e-10;
Then the rest of the code is the actual fitting that it does.How do I get this thing to work in the command line???????????Please help! The .m file is supposed to give A, B, C, D as output with z,x, y, noiseamount as input where z is the array. Thus,[A,B,C,D]=mod(z,x,y,noiseamount).
The .m file says for x and y that this matrix or vector issupposed to have the same size as does z, & each element givesthe x- (or y-) coordinate for the pixel that corresponds to it.Then it says they should be in column form and has a couple linesthat follow: x=x(:); y=y(:); Z=z(:)+1e-10;
Then the rest of the code is the actual fitting that it does.How do I get this thing to work in the command line???????????Please help!
Explanation / Answer
Make sure you have set matlab to the directory you have downloadedthe mod.m and class.mat to. The first thing you need to do is is load the matrix load('class.mat') you will now be able to use class as a matrix To run the program: you will need to make the correct x and y and pick a value fornoiseamount [A,B,C,D]=mod(class,x,y,noiseamount) hope this helps
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.