create a table with strings and numbers
显示 更早的评论
Hello,
I have two matrixs let say
a = [1:10] -->Var_1
b = [2:2:20] --> Var_2
and one string matrix:
city = {'city_1', 'city_2','city_3','city_4','city_5','city_6','city_7','city_8','city_9','city_10'}
and I want to create and display the table like the figure:

Could someone help me with this task?
Thanks in advance,
1 个评论
dpb
2021-5-19
See the doc and examples for the table function --
tData=table(city,a,b,'variablenames',{'City','VarA','VarB'});
采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!