473,386 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Updating a matrix in a time interval inside a for loop

1
I would like to get a maximum of a matrix in intervals inside for loop.

Matrix K has dimension (N,3,3). I like to have a matrix P (Max of K) between N 1 to 10, and then update it again with K and find the maximum at N 10 to 20.

So far I can get the maximum of the matrix K but can't update it in each interval.

Thanks in advance.



L=3
N=30
Interval=10
VB=[]
for nstep in np.arange(N):
V=[]
for i in range(0,L):
U=[]
for j in range(0,L):
m=i+4*(i)*j*nstep-5*j*i
U.append(m)
V.append(U)
VB.append(V)
K=np.array(VB)
P=np.zeros((1,L,L))
for i in range(0,N):
for j in range(0,L):
for k in range(0,L):
if (K[i][j][k]>P[0][j][k]and(i%interval!=0)):
P[0][j][k]=K[i][j][k]
May 17 '20 #1
0 2401

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Rob | last post by:
Hi, I have a question, when you use a random number generator Random() in a loop to generate say 50000 random numbers; is it any difference if you use different time interval between each loop...
4
by: Andrew Poulos | last post by:
How do I convert a length of time, measured in seconds, into a "point in time" type time interval or what's represented as: time (second,10,2) The format is: PS]] where: y: The number of...
2
by: VB User | last post by:
I need to which time interval a given time is within. What is the function I can use?
1
by: greg chu | last post by:
Hi, not sure who has done this. I want to set up a time interval that could be pass midnight. so people can enter 8AM to 8AM (pass midnight to 2nd day) 8AM to 2 AM (pass midnight to 2nd day)...
0
by: achio84 | last post by:
Hi all, I'm a newbie in .Net programming. I'm developing a web application that has a listbox containing more than 1000++ items. This listbox is dynamic as the content will change on a time...
6
by: newsteve1 | last post by:
hi, this should be simple but its stumping me, I am trying to make a slideshow that pulls random images at a random time interval (between 1 and 4 seconds). The images part works fine, and I...
1
by: mndprasad | last post by:
Hi all I need a help here..am doing an application in jsp..i got struck in a position where i have not done that before There are multiple users in my application..for each user the time...
0
by: mariasoosai | last post by:
I have to send the jobs status that are started running from the previous day 9.00 a.m to today 9 a.m from the table sysjobhistory in sql server msdb database.But in that table , date and time are...
1
by: madankarmukta | last post by:
HI, I created the process which is hook to launch just before the Desktop appears and after the login credentials are entered by the machine owner.In Xp it is giving the expected result i.e. my...
4
by: yuvang | last post by:
i have a mdb located in server and n number of users are accessing and adding data to that mdb (source table). now i want to save the mdb tables in particular time interval frequently.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.