we have a character cell [d d d d] and [d -d d -d]. how can we get [d+d d-d d+d d-d].

답변 (1개)

Walter Roberson
Walter Roberson 2016년 11월 23일

0 개 추천

first = {'d', 'd', 'd', 'd'};
second = {'d', '-d', 'd', '-d'};
result = regexprep(strcat(first(:), {'+'}, second(:)), '+-', '-').' ;

카테고리

도움말 센터File Exchange에서 Entering Commands에 대해 자세히 알아보기

제품

질문:

2016년 11월 22일

답변:

2016년 11월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by