how to save all results of for loop

1 view (last 30 days)
Fateme Jalali
Fateme Jalali on 9 Dec 2015
Edited: James Tursa on 9 Dec 2015
Hi, I wrote this program & my data set is:
I want to do my thesis as well as possible. I want to save all results of for loop (all s) in a matrix. can anyone help me ? Code:
text1 = fileread('D:/a.txt');
length1=length(text1);
whitespace1 = find(text1,' ');
w=strfind(text1,' ');
u=1:size(w,2);
%s=zeros(size(w,2)-1,2)
for i=1:size(w,2)-1;
s = text1(w(i)+1:w(i+1)-1)
end

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!