Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to do a matrix from vectors
2 次查看(过去 30 天)
显示 更早的评论
Good Afternoon,
I have to do a matrix starting from five vectors with the same dimensions but different class. Two vectors are "int32" and the other three are "single", when I do the matrix matlab converts the three vectors "single" to "int32" and approximates the values. Is there a way to convert "int32" or another way to do the matrix?
The first two vectors are "int32" while the last three are "single"
This is the method that I have adopted:
A = [time1 time2 Hs_buoy Tm_buoy Dm_buoy]
0 个评论
回答(2 个)
Matt J
2020-2-21
One way,
A=cell2mat( cellfun(@single,{time1 time2 Hs_buoy Tm_buoy Dm_buoy},'uni',0) )
0 个评论
此问题已关闭。
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!