How to store my data
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi! I have the following code for 20000x2 data. Everything should be correct, only thing is that I need to store the w's to be able to plot them. Please, can anyone help me with the code? I tried to add (i) behind trajectories in the last line, but it returned that the left side is not compatible with the size on the right side.
load('ojaData-2.mat')
w = [0.15; 0.25]
for i = 1:20000
x = ojax(i,:)
o = x*w
w = w+0.01*o*(x'-o*w)
trajectory(i) = w
end
댓글 수: 0
채택된 답변
Star Strider
2018년 11월 12일
Since we do not have your ‘ojaData-2.mat’ file, the only recommendation I have is to save ‘trajectory’ as a cell array:
trajectory{i} = w
Note the curly brackets {} indicating cell array indexing.
댓글 수: 2
Star Strider
2018년 11월 12일
편집: Star Strider
2018년 11월 12일
With all due respect, I do not have your data. I also do not know how your plot should look. I do not even have any idea what you are plotting.
However, if my Answer helps you solve your problem, please Accept it!
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!