About vector comparasion question.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, I know I have asked the similar question, I want to write a if statement that compare vectors, like a, b is 3 dimensional vector, however if a<=b returns a 3-dim vector that do the comparison for each entry.
Is there a command just do a whole comparison at once? Thanks.
0 Kommentare
Akzeptierte Antwort
Mahdi
am 2 Apr. 2013
Have you tried using the 'or' operator?
if size(a,2)==3 | size(b,2)==3
...
elseif size(a,1)<=size(b,1)
...
end
Sorry, you weren't very clear, but I hope some of the above will help.
5 Kommentare
Jan
am 2 Apr. 2013
@C Zeng: Flagging is used to tell the admins and editors, that a message violates the using conditions of the forum. Please press the "Accept" button instead of setting a flag. Thanks.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Function Creation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!