필터 지우기
필터 지우기

I need to convert the number {11.741677 ] to {11741677} without the point

조회 수: 5 (최근 30일)
imola
imola 2014년 8월 7일
편집: imola 2015년 2월 17일
Dear all, I I need to convert the vector
{11.741667 3.913892 14.488700 8.746350 0.349066}
to integer numbers
{11741667 3913892 14488700 8746350 0349066}
thanks in advance, I really appreciate your help.

채택된 답변

Patrik Ek
Patrik Ek 2014년 8월 7일
편집: Patrik Ek 2014년 8월 7일
It is always possible to go the long way around here.
a = {11.741667 3.913892 14.488700 8.746350 0.349066};
str = cellfun(@num2str,a,'un',false);
str = strrep(str,'.','');
myStream = horzcat(str{:});

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by