How to copy only the output of a function and paste the output in another function?
2 ビュー (過去 30 日間)
古いコメントを表示
Suppose the output of your first function is y1=x^2, and the input of your second function is y2=y1+10. How can I copy only the charechters "x^2" and paste that in y2?
0 件のコメント
回答 (1 件)
Kevin Phung
2019 年 2 月 8 日
function y1 = func1(x)
y1 = x^2
end
function y2 = func2(x)
y2 = x+10
end
y2 = func2(func1(2)) % if x=2
4 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!