MATLAB code to find the frequency of each element in some alloys
조회 수: 1 (최근 30일)
이전 댓글 표시
I need a MATLAB code to find the frequency of each element in some alloys that are the input file:
The input:
The output:
Best
M. Vaghari
댓글 수: 3
John D'Errico
2020년 9월 7일
Since this is likely homework, what have you tried? If nothing, why not? In that case, you just need to start learning MATLAB. So make an effort. Show you are trying, and what you tried. You will likely gain some help then.
채택된 답변
Rik
2020년 9월 7일
You can you the histogram related function histcounts to count occurences. You just need to split the alloy name in the constituent elements, which should be easy, because each upper case letter is a new element. The best tool to use is probably regexp with the split option.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Text Data Preparation에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!