フィルターのクリア

How to get the variables from other function

2 ビュー (過去 30 日間)
Srihari
Srihari 2012 年 1 月 25 日
Imagine there are two functions eg. pso() and fitness(location,conf). pso is the main function where are the starting boundary and max boundary are declared for the conf. After running the pso it will run the fitness function to find the optimum values. Now i want to generate only the end optimum values from the pso(). can anyone help me how to declare so that i can see the last values. Make sure that the declaration has to be with in pso()

回答 (1 件)

Sven Schoeberichts
Sven Schoeberichts 2012 年 1 月 25 日
I am not sure if I understand your question, but if you want to transfer variables from one function to another you can make use of input and output variables, or transfer the variable as a global.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by