前车位置查询函数

def searchfrontcar(current_location,matrix_cells):
    i=len(matrix_cells)
    if current_location == i:
        location_frontcar=0
    else:
        for j in range(current_location,i+1):
            if matrix_cells[j] !=0:
                location_frontcar=j+1
                break
            else:
                location_frontcar=0
    return location_frontcar

有一段时间没更新了,最近一直在忙课题组的一个工程项目abaqus模型过段时间传上来,接下来可能转做catia开发,
这是一个车桥计算的一个函数,打算利用时间把它改成python版本,顺便练习练习基础。

这些天高考分数又出了,正好劝一下
‘一入土木深似海,从此幸福是路人!’
发布了30 篇原创文章 · 获赞 21 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/cywtiancai/article/details/80806011