Filter löschen
Filter löschen

Repeating replacements in a row

3 Ansichten (letzte 30 Tage)
Matt Brianik
Matt Brianik am 16 Jan. 2018
Kommentiert: Stephen23 am 16 Jan. 2018
I’m having one final problem where I need to read in different rows of a table and replace specific values in each row with corresponding values in another table. so values 999 in Row A in table 1 need to be replaced by the first value in table 2 (Table 2 is just 1 Column of numbers),then 999 values in Row B in table 1 need to be replaced by value 2 in table 2.
I’m having a lot of difficulty with this, do you have any suggestions?
  9 Kommentare
Stephen23
Stephen23 am 16 Jan. 2018
Bearbeitet: Stephen23 am 16 Jan. 2018
In general just use indexing:
M(isnan(M)) = somelimitvalue
You might need to apply this to just one column, or otherwise tailor it to however your data is arranged.
Stephen23
Stephen23 am 16 Jan. 2018
Matt Brianik's "Answer" moved here:
here is a sample file, i have my code reading in
here is what i have been doing so far code wise
clear
close all
CHOSEN_FILE='Sample_File.csv';
Table_Data = xlsread(CHOSEN_FILE);
% Table_Data(isnan(Table_Data))=999999;
Table_Labels = readtable(CHOSEN_FILE);
[Initial_CellCount_Rows,HH]= size(Table_Data);
Well_Data = Table_Data(4:Initial_CellCount_Rows,1:3:end)
Well_Labels= Table_Labels(2,5:3:end);
Well_Labels= table2cell(Well_Labels);
[CellCount_Row,CellCount_Collum] = size(Well_Data);
Number_of_Wells=CellCount_Collum;
Number_of_Compounds=(CellCount_Row);

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by