フィルターのクリア

HOW I GET RESULT ONLY NOT ANS

3 ビュー (過去 30 日間)
Ghulam Murtaza
Ghulam Murtaza 2016 年 6 月 22 日
回答済み: Walter Roberson 2016 年 6 月 22 日
I have a code
[x,y,n]=pc(v,c,b);
when i run the code i got ans not x,y,n as variable, I mean x y n not appear in workplace.

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 6 月 22 日
If you have that line inside a function, then the variables will appear in the workspace of the function and you would have to assign them as outputs of the function to return them to the calling workspace. For example
function [x, y, n] = run_pc
v = rand(10); c = rand(20); b = rand(1,10);
[x, y, n] = pc(v, c, b);
end
and then
[x, y, n] = run_pc;

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by