User:Anthony.haffey
Jump to navigation
Jump to search
I'm a psychology researcher, wanting to promote the use and development of Open-Source software. On this page I'm going to list code that I've used in matlab and whether it works on Octave or not. If not, I will try to link or upload a working version of the file. Please let me know if there's a repository for such a list.
Mathworks/User | Matlab Code | Octave Version |
---|---|---|
User | uniqueRowsCA | potentially fixed |
ExampleR2C1 | ExampleR2C2 | ExampleR2C3 |
ExampleR3C1 | ExampleR3C2 | ExampleR3C3 |
My current, not confirmed version of unique rows:
%% Anthony's attempt at a unique_row function script function [new_list] = unique_rows_octave(original_list) if size(original_list,2)~=1 extra_column=size(original_list,2)+1; for a=1:size(original_list,1) original_list(a,extra_column)=strjoin(original_list(a,1:size(original_list,2))); end unique_final_column=unique(original_list(:,extra_column)); if (size(unique_final_column,1)~=size(original_list,1)); for a=1:size(unique_final_column,1) b=find(ismember(original_list(:,3),unique_final_column(a))); if(size(b,1))>1 for d=2:size(b,1) original_list(b(d),:)=[]; end end end end new_list=original_list(:,1:extra_column-1); else new_list=unique(original_list) end