フィルターのクリア

how to create continuous variables

4 ビュー (過去 30 日間)
uic
uic 2014 年 11 月 19 日
コメント済み: Star Strider 2014 年 11 月 21 日
hello all :
I need to run a loop for 10000 times and in every iteration, i get an array of values. I need to assign this array of values to a different variable(A1, A2 ,A3,A4,...) in every iteration. what conditions should i use to create the variables ion the same loop?

回答 (3 件)

Star Strider
Star Strider 2014 年 11 月 19 日
Don’t do that!
Name your variables (with k being your iteration counter):
A(:,k) = ... % Column Vectors
A(k,:) = ... % Row Vectors
A(:,:,k) = ... % Matrices
  1 件のコメント
Star Strider
Star Strider 2014 年 11 月 21 日
You will have to be more specific.
What do you want your variables to contain? Row vectors? Column vectors? Matrices?
How are you creating them? Calculations? Reading files?
We need more information if you want us to help you. Ambiguous questions will result in equally ambiguous answers.

サインインしてコメントする。


Image Analyst
Image Analyst 2014 年 11 月 19 日
Don't do it. Why not? See the FAQ.

uic
uic 2014 年 11 月 21 日
But when i tried the above code, there are no new variables being variables being created. I want a code to generate 1000 new variables every time a condition is executed , to store 1000 different variables. I cannot use alphabets because they are only 26. And i cannot assign my valuers to a number. Help me out.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by