How to make a forloop

1 次查看(过去 30 天)
Bénine Karssen
Bénine Karssen 2020-12-16
We are trying to make a for loop for selecting the response errors to the target.
This is the code now:
% Select the response errors to the target, under the condition that the influencer is cardinal
ResponseErrorCar12 = ResponseError2(CardinalInfluencerGabor12);
ResponseErrorCar13 = ResponseError3(CardinalInfluencerGabor13);
ResponseErrorCar14 = ResponseError4(CardinalInfluencerGabor14);
ResponseErrorCar21 = ResponseError1(CardinalInfluencerGabor21);
ResponseErrorCar23 = ResponseError3(CardinalInfluencerGabor23);
ResponseErrorCar24 = ResponseError4(CardinalInfluencerGabor24);
ResponseErrorCar31 = ResponseError1(CardinalInfluencerGabor31);
ResponseErrorCar32 = ResponseError2(CardinalInfluencerGabor32);
ResponseErrorCar34 = ResponseError4(CardinalInfluencerGabor34);
ResponseErrorCar41 = ResponseError1(CardinalInfluencerGabor41);
ResponseErrorCar42 = ResponseError2(CardinalInfluencerGabor42);
ResponseErrorCar43 = ResponseError3(CardinalInfluencerGabor43);
How can we make this more efficient/ in to a loop?
Thanks in advance!
  2 个评论
Image Analyst
Image Analyst 2020-12-16
What kind of variable are the CardinalInfluencerGaborNN? If character strings, can you make it a cell array, or if numbers, can you just make it a regular numerical matrix?
What kind of variable is the output ResponseErrorCarNN? If character strings, can you make it a cell array, or if numbers, can you just make it a regular numerical matrix?
what is ResponseErrorN()? Is ResponseErrorN a cell array, or a function?
Abhishek Gupta
Abhishek Gupta 2020-12-21
Can you provide more information on the data type of 'CardinalInfluencerGaborMN', 'ResponseErrorN', and 'ResponseErrorCarMN' variables?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by