MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayNew to MATLAB?
MATLAB Central > MATLAB Newsreader > nested loop trouble 

Hello, I am trying a function where I will need the following kind of logic of nested loops of for and if else. Can you please let me know where I am going wrong, itsgiving out all zeros as values of a. it is not storing values in a and neither going inside the loop 
On 10/30/2011 10:22 PM, rasika wrote: 
Yes, I just need thiis kind of logic for more complicated function. in place of 
Am 31.10.2011 05:22, schrieb rasika: 
x will be passed in workspace. a does give out a column vector as the same size of t. 
function[a] = checkingtheloops(t) 
On 31 Okt., 09:29, "rasika " <n.ras...@gmail.com> wrote: 
On 31 Okt., 10:07, Torsten <Torsten.Hen...@umsicht.fraunhofer.de> 

Thanks Torsten, 
Thank you Steven, That is a very good suggestion, it will make my code more precise, the only trouble is the input matrices would be of varying size since ot would be directly taken from an experimental data, in that case do I have to change the code manually everytime? 
Hey, it worked, but for values greater than 60 it is returning zero. i kind of wanted it to go in cycles.Should i use a temp or dummy variable inside so it will do it.. what I wanted to achieve is 3 set points of numeric values like 5,15, and 60 and in a huge data set i will have multiple cycles of 60, does it make any sense? 

Also I wanted to know is 

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.