Good Morning every one!! Today i have question too. i have one Matrix which Name is zeile and it includes 181 cell Array which are my 181 Parameters. In Addition i have one Matrix too.Its Name is dataArray and in this Matrix i have all values that belong to 181 Parameter.My question is how can i assign my values to These Parameters?

댓글 수: 5

cemsi888
cemsi888 2015년 1월 28일
cemsi888
cemsi888 2015년 1월 28일
because i have 181 Parameters i want to assign values dynamically. Could you give me advice about this Problem?
Guillaume
Guillaume 2015년 1월 28일
You seem to be asking variations of the same question, always without much details.
In particular, it's really not clear what you want do with the data once we've shown you how to do whatever you're asking. It may well be that what you're asking is not what you need anyway.
Also, how did you get your two cell arrays in matlab, possibly there is a smarter way to load your data that gives you what you want straight away
It would also help if you used proper terminology. parameter has no meaning. You can assign values to variables.
In this particular case, it's unclear what output you want? A structure with field names that are the value from your first cell array and values that are the matrices from your second cell array? Individual variables named after the values from your first cell array (possible, but not a good idea)?
Finally, in your example, zeite has indeed 181 elements, but dataArray has 182.
cemsi888
cemsi888 2015년 1월 28일
first of all i got Experiment results as a text file which includes Parameters and values. First of all i read with textscan all my Parameters and than i created my Matrix zeile which includes 181 variables. after that i read values or results of Experiment which Name is dataArray .I checked it last column (182) is empty.Every column in dataArray must be send to variable in Matrix zeile.I mean for one variable one column

댓글을 달려면 로그인하십시오.

 채택된 답변

Stalin Samuel
Stalin Samuel 2015년 1월 28일

0 개 추천

for it=1:181
zeile{it,1}=dataArray{1,it}
end

댓글 수: 7

cemsi888
cemsi888 2015년 1월 28일
i took this massage from matlab Conversion to cell from double is not possible.
Stalin Samuel
Stalin Samuel 2015년 1월 28일
can u send the two matrix files
cemsi888
cemsi888 2015년 1월 28일
in third file you can see my structure variables too.
var= zeile{1,1}
for it=1:181
tmp = dataArray{1,it}
tmp1 =sprintf('%s',var{it,1})
eval([tmp1 ' = tmp']);
end
cemsi888
cemsi888 2015년 1월 28일
for j=1:181 s.(zeile{1,1}{j,1})=dataArray{1,j} end i made it this way and it works.thanx for your help!!!
cemsi888
cemsi888 2015년 1월 28일
As you see in attached file in Input_Map_1 there are 181 variables. i want to make calculation with them,But how can i call variables
. what is the correct code that i should write my m file??
cemsi888
cemsi888 2015년 1월 28일
Any help!!!! i used str2mat to get the values but it does not work because i have 41*1 Matrix and when used this code i get 41*13 Matrix.. do you have any advice to me?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

질문:

2015년 1월 28일

편집:

2015년 1월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by