Clear Filters
Clear Filters

How to make a forloop

1 view (last 30 days)
Bénine Karssen
Bénine Karssen on 16 Dec 2020
Commented: Abhishek Gupta on 21 Dec 2020
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 Comments
Image Analyst
Image Analyst on 16 Dec 2020
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 on 21 Dec 2020
Can you provide more information on the data type of 'CardinalInfluencerGaborMN', 'ResponseErrorN', and 'ResponseErrorCarMN' variables?

Sign in to comment.

Answers (0)

Categories

Find more on Characters and Strings in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!