Search
 
SCRIPT & CODE EXAMPLE
 

MATLAB

z-score normalize values in tsv file matlab

% Read in the tsv file to a Matlab table
t=readtable('my_file.tsv', 'Filetype', 'text');
% prepend values from column 1 to the normalized values 
% for the remaining columns.
% zscore (in stats toolbox) requires that the data is an array
nrm=[t(:,1), array2table(zscore(table2array(t(:,2:end))))];
% Get the variable names from the original table (t) and 
% add them to the nrm table
nrm.Properties.VariableNames=t.Properties.VariableNames
% Write the output to a csv file:
writetable(nrm,'my_file_nrm.csv')
Comment

PREVIOUS NEXT
Code Example
Matlab :: cos in scilab 
Matlab :: save table matlab 
Basic :: how to make vbs error message box 
Basic :: cmd cd not working 
Basic :: Python: create zipfile 
Basic :: resttemplate authorization basic 
Basic :: visual basic how to determine if an array already contains an item 
Basic :: como colocar aspas duplas em vbnet 
Elixir :: elixir after 
Elixir :: HTTPoison post json 
Elixir :: elixir 
Elixir :: elixir strings 
Elixir :: elixir with else 
Scala :: scalable meaning 
Scala :: scala home set up 
Actionscript :: hello world in actionscript 
Excel :: google sheets convert abbreviation of month to number 
Excel :: excel or formula 
Perl :: perl sprintf YYYYMMDD sample 
Perl :: perl running mechanize through tor 
Pascal :: print pascal triangle 
Powershell :: ps where-object 
Clojure :: ex: Clojure define expected time 
Assembly :: docker cannot stop container 
Assembly :: cout boolalpha 
Assembly :: array days of the week 
Javascript :: jquery vslidation remove spaces from input 
Javascript :: jquery check if screen size 
Javascript :: Error: Node Sass version 5.0.0 is incompatible with ^4.0.0. 
Javascript :: json object length in javascript 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =