MATLAB: Why float no. become integer float hi, i have two vectors the first one is float as: c=[2.5 4 6.5 4.5 3]; c1=[1 2 10 9]; when merge them as: c2=[c c1] why c within c2 become [2 4 6 4 3]? thanks in advance Best Answer I bet if you check class(c1) you will find it is an integer data type. Related SolutionsMATLAB: Can someone show me how to replace the 4th elements of vector a2 with c1, and name the new vector a4 clc; clear alla2 = [1.1 2.2 3 4.4 5.5];c1 = 5-7i ;a4 = a2 ;a4(4) = c1 ; MATLAB: What i’am doing wrong if (0<mean1(j))&(mean1(j)<=60)and so on. Related QuestionFor loops and arraysWhy doenst this work as expectedThe values are lost after the decimal point if I use the double type in the scriptDoes INT8, INT16, INT32 casting in MATLAB round the values to a different integer from that of Simulink when both are configured to round to the nearest integer
Best Answer