MATLAB code to find the frequency of each element in some alloys
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Majid Vaghari
el 7 de Sept. de 2020
Comentada: Majid Vaghari
el 7 de Sept. de 2020
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 comentarios
John D'Errico
el 7 de Sept. de 2020
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.
Respuesta aceptada
Rik
el 7 de Sept. de 2020
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Large Files and Big Data en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!