-1

In MATLAB, i was faced with a incomprehensible syntax.

for i = [1:n-1,n+1:N]
    Z{i} = U{i}(:,r);
end

if you knows exactly, please let me know. (if you show some example(e.g. when n=1, N=3), i can understand your explain easily.)

1 Answer 1

4

This syntax basically means:

for i = [1:n-1,n+1:N]

This just means that i will sequentially take the values defined in the array: 1 till n-1 increasing by 1 and after it will continue from n+1 till N. It will skip n in other words.

Z{i} = U{i}(:,r);

{ represent cells so the ith cell of Z (imagine Z and U as cell arrays) will be assigned the content of ith cell of U from which it will keep though only the r-th column (I guess its a matrix of some kind).

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for your comment. it is very helpful to me. my English skill is very poor, but you understood my questions. thank you very much.
@Idontknow.T.T Don't forget to "accept" the question (click on the tick mark) if it completely satisfied your needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.