I have a function which only take vector as input; however, I need to use rand(x) as input variable but rand function only returns a double type. Is there any way to convert double to vector?? Thank you very much!
here are a few ways:
X = rand(1, 10);
VE1 = X(:);
VE2 = reshape(X, 1, []);
VE3 = reshape(X, numel(X), 1);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.