フィルターのクリア

How to format a complex "IF-AND" statement for easy modification?

1 回表示 (過去 30 日間)
Forrest
Forrest 2014 年 5 月 20 日
回答済み: Forrest 2014 年 5 月 20 日
So I have a pretty simple question. I have a detailed IF-AND statement, that has a lot of various statements associated with it.
What I do in C# when I have something like this is to simply comment out the lines I don't want to use, and it just ignores that line. But it seems like Matlab doesn't like that.
Basically, I will want to toggle on/off various segments, without having to delete, or move things around. It would be nice if I could just comment out the lines I'd liek to have active.
I'll attach a picture as the format of the code below looks a bit hard to read: http://i.imgur.com/AtPzyHG.jpg
if true
%%Comparison Block LOW Data
% zCount = 1;
% for zI = 1:size(gStudy1.sDate)
% if( gStudy1.LcrT(zI) <= LcrT_tgt_U && gStudy1.LcrT(zI) >= LcrT_tgt_B... %Current LOW Price Delta
% && gStudy1.LcrD(zI) <= LcrD_tgt_U && gStudy1.LcrD(zI) >= LcrD_tgt_B... %Current LOW Time Delta
% && gStudy1.LprT(zI) <= LprT_tgt_U && gStudy1.LprT(zI) >= LprT_tgt_B... %Prior LOW Price Delta
% && gStudy1.LprD(zI) <= LprD_tgt_U && gStudy1.LprD(zI) >= LprD_tgt_B... %Prior LOW Calendar Time Delta
% && gStudy1.LprDTT(zI) <= LprDTT_tgt_U && gStudy1.LprDTT(zI) >= LprDTT_tgt_B... %Prior LOW Trade Time Delta
% )
% compDataSet(zCount,:) = gStudy1(zI,:);
%
% zCount = zCount+1;
% end
% end
end

採用された回答

Forrest
Forrest 2014 年 5 月 20 日
Ah... I found it.
Adding the '...' at the front of the line seems to do the trick for what I need right now.
It looks like this, relative to my first attached picture: http://i.imgur.com/7GiloYD.jpg

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalendar についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by