MATLAB Answers

function variables not saved to workspace

10 ビュー (過去 30 日間)
Qiana Curcuru
Qiana Curcuru 2020 年 3 月 10 日
コメント済み: Star Strider 2021 年 10 月 14 日
I define variables in one function and want to pass them off to another function. If I stop the function right before the function ends (at y), x and y are in my workspace, but once the function ends, x and y are gone, and not saved to my workspace.
function [x,y]=myfunc()


Star Strider
Star Strider 2020 年 3 月 10 日
Call the function as:
and both should be in your workspace.
  4 件のコメント
Star Strider
Star Strider 2021 年 10 月 14 日
@Andrew Webster — My pleasure!


その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by