How to pass multiple output from function into cell array

人盡茶涼 提交于 2019-11-30 04:17:54

问题


I have a function with the following prototype

function [bandwidth,density,X,Y,x,y]=kde2d(data,n,MIN_XY,MAX_XY)

basically the function returns 6 outputs as above, some are in vector form while others are a numerical quantity. How can I elegantly pass the output from the function into a 1 by 6 cell array?


回答1:


how about

[a{1:6}] = kde2d( data, n, MIN_XY, MAX_XY );


来源:https://stackoverflow.com/questions/15523851/how-to-pass-multiple-output-from-function-into-cell-array

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!