Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Can any1 give some hints for this thanks

1 visualizzazione (ultimi 30 giorni)
Sun
Sun il 19 Gen 2015
Chiuso: MATLAB Answer Bot il 20 Ago 2021
I have figured out how to round random numbers to nearest specific numbers. But i can't seem to figure out how to load a file with grades and then do the rounding, instead of creating random grades myself and then do the rounding?
My function looks like this atm:
function gradesRounded = roundGrade(grades)
%data0=load(filename);
A = readtable('grades');
gradeskala = [-3 0 2 7 10 12];
N = [0.1 2.2 1.6 7.3 10 -1.5];
NRounded = interp1(gradeskala,gradeskala,N,'nearest')
end
The task is this:
%

Risposte (1)

Image Analyst
Image Analyst il 19 Gen 2015
Do File->New. Then type in a bunch of numbers and save it to a disk file. then read it in with something like dlmread() or importdata().

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by