MATLAB: Making a table for degrees and radians

arraysMATLABtable

Hi,
I'm trying to make a table off of two arrays but on using the 'table' function, I'm only getting the size of the arrays.
clc;
clear all;
Degrees=[0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360];
%for i=1:length(Degrees)
% Radians(i)=Degrees(i)*(pi/180);
%end
T=table(Degrees);
T.Radians=(T.Degrees*pi)./180;
T(1:1,:)
How do I make the table display the values of the arrays Degrees and Radians?

Best Answer

TABLE = array2table([Degrees(:), deg2rad(Degrees(:))], 'VariableNames', {'DEGREES', 'RADIANS'})