how to link sectors with companies?

1 visualización (últimos 30 días)
e.a.
e.a. el 15 de Mayo de 2020
Comentada: e.a. el 15 de Mayo de 2020
Hello everyone,
I am doing a project, portfolio optimization. I have 10 sector and 500 companies in these sectors. I want user to choose sector/sectors, and force the program to use the those companies within the choosen sectors. Each sector has different number of companies meaning that not every sector has 50 companies in it. I couldnot find a solution/way for my problem. I would be glad if one of you can help me.
  2 comentarios
Steven Lord
Steven Lord el 15 de Mayo de 2020
How are you storing your data? Do you have a table, a 500 element vector containing numbers between 1 and 10, a 500-by-10 array with true in an element indicating that row's company is in that column's sector, etc. Or have you not yet imported the data (from a text file?) into MATLAB and so it's only in the file / database / other storage system?
e.a.
e.a. el 15 de Mayo de 2020
Hello Steven, thank you for your answer.
Actually I basically wrote manully in matlab, and created a string array, I didnot use any file for the companies/sectors. Because I couldnot find a easy way to do it, I defined the companies for each sector seperately and combine them together. Idk if it is clear, I just started to learn matlab, sorry in advance if it is not clear.
for example:
sec1 = ["compA,"compB","compC"]
sec2 = ["compD", "compF"]
sec3 = ["compT", "compR","compY","compP"] and so on for every sector totalling 10.
now I will ask user to select a sectors and the companies. idk if I am doing it in right way.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by