Month: July 2024
xlookup multiple values
Hello I am trying to use a column where each cell has multiple Unique Identifiers separated by a column. in another sheet there’s a column where each cell has a singular unique Identifier. I am trying to pull the products associated with the singular identifiers and bring each unique product separated by commas, into another column. I did it manually for example below. I think it should be some sort of xlookup but I can’t figure it out. I need a forumla to give me column b.
Hello I am trying to use a column where each cell has multiple Unique Identifiers separated by a column. in another sheet there’s a column where each cell has a singular unique Identifier. I am trying to pull the products associated with the singular identifiers and bring each unique product separated by commas, into another column. I did it manually for example below. I think it should be some sort of xlookup but I can’t figure it out. I need a forumla to give me column b. Read More
Process Monitor 2.0 for Linux and Sysmon v15.15
Microsoft Tech Community – Latest Blogs –Read More
The Microsoft Copilot Dashboard is now included with Copilot for Microsoft 365
As previously announced, the Microsoft Copilot Dashboard is now available as part of Copilot for Microsoft 365 licenses and no longer requires a Viva Insights premium license. We are now rolling out the Microsoft Copilot Dashboard to Copilot for Microsoft 365 customers in a few phases over the next few months. More details on what’s changing and timing are below.
Understanding how Copilot is being leveraged by your organization is paramount to driving adoption and impact. That is why we created the Microsoft Copilot Dashboard.
The Copilot Dashboard helps you:
Prepare for your Copilot rollout
Understand how employees utilize Copilot
Measure the impact of your Copilot investments
The Copilot Dashboard provides actionable insights to help organizations deploy Copilot, drive adoption based on workplace patterns and measure impact. The dashboard covers the following metric categories: Readiness, Adoption, Impact, and Sentiment. Additionally, the Learning section provides a library of research and best practices to support your AI journey.
Access to the Copilot Dashboard is available to a limited number of leaders in the organization as well as Global Admins (details here). If you have access to the Copilot Dashboard, you can find it in the Teams or web app.
What’s new in the Microsoft Copilot Dashboard
The inclusion of the Copilot Dashboard with Copilot for Microsoft 365 allows us to provide a more comprehensive view of usage across your organization. Users will now see data for all Copilot license holders, not just those users with a Viva Insights license. By including every employee with a Copilot license in the analyzed population, organizations gain a better understanding of the workforce to make data-driven decisions that support AI transformation.
As part of this update, we are also unifying all Copilot Dashboard settings for the Global administrator in the Microsoft 365 Admin Center to make management more streamlined. New controls are available for admins to manage which employees should be analyzed in the Copilot Dashboard (details here). With these new controls, admins can now:
Assign access to the Copilot Dashboard
Upload organizational data
Manage a list of non-Copilot users for comparison
Create an exclusion list
Adjust minimum group size for generating insights
Customer rollout plan
The availability of the Copilot Dashboard for Copilot for Microsoft 365 customers will occur in phases on a rolling basis, starting now.
Customers with over 100 assigned Copilot for Microsoft 365 licenses or 10 assigned premium Viva Insights licenses will begin to see the Copilot Dashboard now.
Customers with less than 100 assigned Copilot for Microsoft 365 licenses will receive the dashboard in the coming months. Timing will be refined as we progress through the phased rollout but we are working to accomplish this in the next 3 months.
Customers with less than 10 assigned Copilot for Microsoft 365 licenses will continue to get access to a limited Copilot Dashboard they have today that features tenant-level metrics.
Once you have the Copilot Dashboard, you will see updated Adoption and Impact reports for all Copilot license holders.
Go deeper with advanced Copilot reporting in Viva Insights
Customers looking for more advanced Copilot reporting should consider Viva Insights for a more customized experience. Analysts can use Viva Insights to create custom reports to better understand Copilot usage at a more granular level and bring in additional data sets from HRIS, CRM and other systems to identify the business value of Copilot for your organization.
Some Copilot reporting capabilities exclusive to Viva Insights include:
Ability to pull usage data older than 28 days
Ability to pull in third party, functional data – for example sales performance or customer service KPIs – to identify business value correlations
Ability to filter and group using custom organizational attributes
Ability to build custom views, dashboards and dynamically change dates
Ability to customize the definition of active Copilot users and other metrics
Advanced, customizable reports for Copilot Adoption and Impact are available now in Viva Insights, take a look!
With Viva Insights, you can take your Copilot reporting to a whole new level to further accelerate your AI transformation. To use Viva Insights for advanced Copilot reporting, you must have a Viva Insights license.
Next steps and resources
We are very excited to bring the Copilot Dashboard to Copilot for Microsoft 365 customers and we hope you find the above updates helpful. We will continue to innovate on both the Copilot Dashboard and advanced Copilot reporting capabilities in Viva Insights and will provide updates on an ongoing basis. Please stay tuned for more updates and features to help you drive Copilot adoption and impact.
We have a wealth of resources to help you get the most out of your Microsoft Copilot Dashboard. Here are a few to get you started.
MS Learn: Microsoft Copilot Dashboard support and setup
eBook: Microsoft Copilot Dashboard Metric Interpretations and Considerations
Learn more about Viva Workplace Analytics and Employee Feedback and Viva Insights solutions. See features, demos, pricing and more.
Microsoft Tech Community – Latest Blogs –Read More
Join us for the FY25 Azure Playbook Partner Landing Calls
Please join us in kicking-off our fiscal year and see the plans from the Azure Partner Strategy team for Infrastructure, Digital and Application Innovation and Data and AI. This training is made available for all Microsoft Partners.
Azure Infrastructure playbook
When:
Tuesday, July 30th
Option 1 at 8:00-9:00 AM PT and Option 2 at 5:00-6:00 PM PT. A recording will be made available following the session.
Agenda:
Overview
Be AI-Ready
Foundational Priorities
Microsoft Sales Priorities
Partner Opportunity
FY25 GTM Partner Strategy
Priorities and Key Area of Focus
Solution Play Prioritization
The Customer and Partner Journey
Mainstream Solution Plays
Winning in SMB
Microsoft AI Cloud Partner Program
Investments
Partner Investments Summary and Direction
Azure Discovery Workshops
AMM/Azure Innovate Partner-Led Offerings
Hero Investment One-Sliders
Build Your Business
Partner Skilling
Partner Enablement Evolution in FY25
Partner Enablement Big Bets
Partner Marketing Campaigns
Azure Digital and Application Innovation & Data and AI playbook
When:
Wednesday, August 7th
Option 1 at 8:00-9:00 AM PT and Option 2 at 5:00-6:00 PM PT. A recording will be made available following the session.
Agenda:
Overview
Foundational Priorities
AI Design Wins
Data & AI and Digital and App Innovation Business Overview
Partner Opportunity
FY25 GTM Partner Strategy
GTM Priorities
Solution Plays by Customer Segment
The Customer and Partner Journey
Mainstream Solution Plays
Resources
Build Your Business
Microsoft AI Cloud Partner Program
Partner Enablement Evolution in FY25
Partner Enablement Big Bets
Practice Building Resources
Investments
Partner Investments Summary and Direction
Partner Marketing
Campaign in a Box
Through Partner Marketing Roadmap
Thank you,
Azure Data & AI and Digital and App Innovation Partner Strategy Teams
Microsoft Tech Community – Latest Blogs –Read More
Partner Case Study Series | Upstream
Upstream focuses on mobility service infrastructure and customer success
With offices and representatives in Israel, the United States, the United Kingdom, Germany, Japan, and Korea, Upstream helps corporations mitigate connectivity risks and ensure the safety and security of smart mobility solutions. The company’s cybersecurity and data professionals maintain a clear focus on customer success, resulting in comprehensive protection of mobility service infrastructure, connected vehicles, and, most importantly, drivers and passengers.
Upstream is a graduate of the Microsoft ScaleUp program and has announced a partnership with Microsoft Azure Sentinel and the MCVP automotive team. Upstream’s C4 (Centralized Connected Car Cybersecurity) platform, available in the Azure Marketplace and on AppSource, runs on customers’ private clouds, utilizing multiple Azure connectors, storage, and processing capabilities, as well as prebuilt integrations with Azure Sentinel SIEM (security information and event manager).
Continue reading here
**Explore all case studies or submit your own**
Microsoft Tech Community – Latest Blogs –Read More
Soft delete for NFS Azure file shares is now Generally Available.
Soft delete protects your Azure file shares from accidental deletion. The following feature was already made available for SMB File share. Today, we are announcing the general availability of soft delete for NFS Azure file shares. The functionality will remain the same. Soft delete is like a recycle bin for your file shares. When a NFS file share is deleted, it transitions to a soft deleted state in the form of a soft deleted snapshot. You get to configure how long the soft deleted data is recoverable before it is permanently erased as part of the retention policy, by default its set to 7 days.
Today, soft deleted NFS shares are not being counted towards the Storage account limit. We are providing a 30-day window (grace period) to update or change your automation scripts to account for soft deleted capacity when soft delete is enabled for NFS shares. By Sept 1st, 2024, we will roll out the change to start counting soft deleted capacity towards the account limit.
What will change from September 1st 2024?
soft deleted capacity will start counting towards storage account limits, this means the number of file shares that you can create on given storage account will be guarded by storage account limits when soft delete is enabled. Refer here for more information on supported capacity limits.
Soft-deleted shares will be listed under deleted shares in the file share blade. To mount them or view their contents, you must undelete them. Upon undelete, the share will be recovered to its previous state, including all metadata as well as snapshots (Previous Versions). To successfully perform undelete ensure you do not have an active file share with the same name as that of deleted state.
Soft delete feature is enabled by default on a storage account, the setting will apply to both NFS and SMB file shares. If you have an existing NFS file share in soft delete enabled account then, you would be enrolled for billing automatically. Soft delete enabled shares are billed on the used capacity when soft deleted at the snapshot rate while in the soft delete state. Billing would stop as soon the data is permanently deleted after the retention expires on the soft deleted state. Please refer here for Pricing and billing details.
Microsoft Tech Community – Latest Blogs –Read More
Partner Blog | Activating the ecosystem: marketplace multiparty private offers expand to new regions
Our guest contributor for today’s blog is Jake Zborowski, General Manager, Marketplace Product.
The rise of cloud marketplaces as the go-to destination for customers prioritizing flexibility and economic value underscores the significance of the Microsoft commercial marketplace in our collaborative go-to-market approach. With multiparty private offers, partners can now co-sell through the marketplace framework. We are excited to announce that this growth opportunity is now available to customers in the United Kingdom and Canada, adding to our existing availability in the United States.
It is estimated that the cloud marketplace opportunity will reach $45B by next year, with one-third of the revenue expected to be driven by channel partners. With a robust ecosystem comprising over 500K partners, we are doing more to drive collaborative selling. Multiparty private offers are designed to empower channel partners to broaden their customer engagements through the marketplace, while empowering ISVs to scale to new sales channels.
Continue reading here
Microsoft Tech Community – Latest Blogs –Read More
Microsoft is headed to VMware Explore 2024 in Las Vegas
If you want to know about Azure, the work we are doing in partnership with VMware by Broadcom, or have a conversation about your VMware workloads, stop by our booth #1216!
This year Microsoft will have several sessions on a variety of migration related topics, so if you’re building out your schedule check them out:
Microsoft Keynote: Future-Proof VMware Workloads with Azure VMware Solution
Speaker: Brett Tanzer, Vice President of Azure Solutions and Ecosystem, Microsoft
Date/Time: Wednesday, August 27 @ 9:00 AM – 9:45 AM Pacific time
Join our keynote to discover how Microsoft can streamline your VMware workloads’ migration to the cloud. Learn how to maximize your existing on-premises investments and fast path your applications into an AI-innovation platform. We’ll reveal the quickest, least disruptive migration path, and share enticing offers that make this an easy decision. Learn how transitioning from on-premises to Azure will give your business a competitive edge.
Microsoft Sessions – Register now to reserve your seat!
In addition to the keynote, here are other deeper-level sessions on Azure VMware Solution:
Monday, August 26
9:00-10:30 AM
90-min Tutorial
Discover How Azure VMware Solution Can Leverage the Power of Azure and AI
VCFT2526LVS
Monday, August 26
11:30 AM-12:15 PM
Breakout Session
Azure VMware Solution: Harness the Power of Data With Azure Services and AI
VCFB2527LVS
Monday, August 26
1:15-2:45 PM
Hand-on Lab Session
Modernize Your Azure VMware Solution Workloads and Innovate with Azure Native Services
ELW2510LVS
Azure VMware Solution
Day & time to be published
Meet the Expert Roundtable
Meet the Expert Roundtable: Ask Me Anything About Azure VMware Solution
VCFM2528LVS
Tuesday, August 27
10:30-11:15 AM
Breakout Session
Azure VMware Solution: Extend VMware Infrastructure To Azure The Fast Way
VCFB1495LV (VMware)
Tuesday, August 27
10:45 AM-12:15 PM
Hands-on Lab Session
Enhance the Security of Your Applications and Data With Azure and Azure VMware Solution
ELW2509LVS
Tuesday, August 27
3:00-3:20 PM
Expo Theater Session
Datastore Dilemma for VMware Cloud Foundation: The Best of Both Worlds EXPO2570LVS (NetApp)
Tuesday, August 27
3:30-3:50 PM
Expo Theater Session
What’s New in Windows Server 2025 & Azure VMware Solution EXPO2549LVS
Azure VMware Solution
Day & time to be published
Meet the Expert Roundtable
Meet the Expert Roundtable: Ask Me Anything About Azure VMware Solution
VCFM2529LVS
Wednesday, August 28
9:00-9:45 AM
Microsoft Keynote
Microsoft Keynote: Future-Proof VMware Workloads with Azure VMware Solution
VCFB2530LVS
Wednesday, August 28
10:15-11:00 AM
Breakout Sessions
Building End-To-End Networking with Azure VMware Solution
VCFB2531LVS
Wednesday, August 28
11:30 AM-12:15 PM
Breakout Sessions
Discover the Partner Ecosystem for Azure VMware Solution
VCFB2532LVS
Wednesday, August 28
12:45-1:30 PM
Breakout Sessions
Best Practices for Migration and Security with Azure VMware Solution
VCFB2533LVS
Wednesday, August 28
2:00-2:45 PM
Breakout Sessions
Implementing a Robust BCDR Plan with Azure VMware Solution
VCFB2534LVS
Microsoft Tech Community – Latest Blogs –Read More
Matlab Custom Add-On disappearing from Add-On list after restarting the Matlab instant
Hi,
I am working with custom Matlab add-on (simulink toolbox) which I tried installing (with/without admin access), but everytime I close the Matlab and reopen the new instance I lose that add-on from add-on list that also mean I am not able to use those custom toolboxes.
Please note I still see the custom add-on installation present on the disk at following folder.
Users<user.name>AppDataRoamingMathWorksMATLAB Add-OnsToolboxes<<CustomToolBox>>
Does anyone know what is the resolution to this?Hi,
I am working with custom Matlab add-on (simulink toolbox) which I tried installing (with/without admin access), but everytime I close the Matlab and reopen the new instance I lose that add-on from add-on list that also mean I am not able to use those custom toolboxes.
Please note I still see the custom add-on installation present on the disk at following folder.
Users<user.name>AppDataRoamingMathWorksMATLAB Add-OnsToolboxes<<CustomToolBox>>
Does anyone know what is the resolution to this? Hi,
I am working with custom Matlab add-on (simulink toolbox) which I tried installing (with/without admin access), but everytime I close the Matlab and reopen the new instance I lose that add-on from add-on list that also mean I am not able to use those custom toolboxes.
Please note I still see the custom add-on installation present on the disk at following folder.
Users<user.name>AppDataRoamingMathWorksMATLAB Add-OnsToolboxes<<CustomToolBox>>
Does anyone know what is the resolution to this? simulink toolbox, add on MATLAB Answers — New Questions
How do I pull data from multiple excel spreadsheets located in the same folder?
Hello!
I’m trying to record a specific data point from multiple excel files that are located in the same folder and dump them into their own table.
To elaborate, I have thousands of excel files all under the path ‘C:UsersMeDataFiles’. I want to open each file, take the data from cell M18, and put it into its own table with all the data points.
I currently have a line using the readmatrix function and I’m able to read just the first file in the folder, but nothing else. I already have a table populated with serial number information, so I get an error that the table variables must have the same number of rows.
Any help would be greatly appreciated, thank you!Hello!
I’m trying to record a specific data point from multiple excel files that are located in the same folder and dump them into their own table.
To elaborate, I have thousands of excel files all under the path ‘C:UsersMeDataFiles’. I want to open each file, take the data from cell M18, and put it into its own table with all the data points.
I currently have a line using the readmatrix function and I’m able to read just the first file in the folder, but nothing else. I already have a table populated with serial number information, so I get an error that the table variables must have the same number of rows.
Any help would be greatly appreciated, thank you! Hello!
I’m trying to record a specific data point from multiple excel files that are located in the same folder and dump them into their own table.
To elaborate, I have thousands of excel files all under the path ‘C:UsersMeDataFiles’. I want to open each file, take the data from cell M18, and put it into its own table with all the data points.
I currently have a line using the readmatrix function and I’m able to read just the first file in the folder, but nothing else. I already have a table populated with serial number information, so I get an error that the table variables must have the same number of rows.
Any help would be greatly appreciated, thank you! importing excel data MATLAB Answers — New Questions
How do I solve the construct marices of multiple variables and plot a graph
I am a beginner to MATLAB.
I tried but I’m getting errors.
Anybody, kindly help. Thank you.
Equations dx/dt=-2x
dy/dt=2x
Initial condition: x(t=0)=100
y(t=0)=0
tspan=[0 3];
x0=100;
y0=0;
dzdt = (dxdt dydt);
[tSol, zSol]=ode45(@odefun,tspan,x0);
plot(tSol, zSol);
function dzdt=odefun(t,z)
x = z(1);
y = z(2);
dxdt = -2*x;
dydt = 2*x;
dzdt = [dxdt;dydt];
endI am a beginner to MATLAB.
I tried but I’m getting errors.
Anybody, kindly help. Thank you.
Equations dx/dt=-2x
dy/dt=2x
Initial condition: x(t=0)=100
y(t=0)=0
tspan=[0 3];
x0=100;
y0=0;
dzdt = (dxdt dydt);
[tSol, zSol]=ode45(@odefun,tspan,x0);
plot(tSol, zSol);
function dzdt=odefun(t,z)
x = z(1);
y = z(2);
dxdt = -2*x;
dydt = 2*x;
dzdt = [dxdt;dydt];
end I am a beginner to MATLAB.
I tried but I’m getting errors.
Anybody, kindly help. Thank you.
Equations dx/dt=-2x
dy/dt=2x
Initial condition: x(t=0)=100
y(t=0)=0
tspan=[0 3];
x0=100;
y0=0;
dzdt = (dxdt dydt);
[tSol, zSol]=ode45(@odefun,tspan,x0);
plot(tSol, zSol);
function dzdt=odefun(t,z)
x = z(1);
y = z(2);
dxdt = -2*x;
dydt = 2*x;
dzdt = [dxdt;dydt];
end ode MATLAB Answers — New Questions
background image with know cords not scaling properly when same grid values are assigned in Matplotlib python
I have a map. On this map i have known x,y positions and the know origin value (1,1) and max value(419,419). when given into matlablip i get very close to accurate values at the center of the map but near the top and bottom they vary by 5 or 6 units. almost the like image is being gently stretched from the middle out. i assume this is to bind it the the grid size.
My map image is 2048×2048 pixels. and i am constraining the map to a 419×419 grid. I’m assuming that due to the way its scaling the image im getting this strech but i’m unable to see what settings might fix this.
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image
import os
from matplotlib.patches import Rectangle
from matplotlib.widgets import Button
# Directory path
dir_path = ‘MY_DIR/’
# Load background image
print("Loading background image…")
background_image_path = os.path.join(dir_path, ‘MY_IMAGE’)
background_image = Image.open(background_image_path)
# Load grid size and offsets from file
print("Loading grid size, obstacle offset, and image offset…")
size_file_path = os.path.join(dir_path, ‘size.txt’)
with open(size_file_path, ‘r’) as file:
grid_size_x, grid_size_y = map(int, file.readline().strip().split(‘,’))
obstacle_offset_x, obstacle_offset_y = map(float, file.readline().strip().split(‘,’))
image_offset_x, image_offset_y = map(float, file.readline().strip().split(‘,’))
print(f"Grid size: {grid_size_x}, {grid_size_y}")
print(f"Obstacle offset: {obstacle_offset_x}, {obstacle_offset_y}")
print(f"Image offset: {image_offset_x}, {image_offset_y}")
# Function to load obstacles from B&W image
def load_obstacles_from_image(image_path, grid_size_x, grid_size_y):
print("Loading obstacles from B&W image…")
bw_image = Image.open(image_path).convert(‘L’)
bw_image = bw_image.resize((grid_size_x, grid_size_y))
bw_array = np.array(bw_image)
obstacles = []
for y in range(grid_size_y):
for x in range(grid_size_x):
if bw_array[y, x] < 128: # Assuming obstacles are black (value < 128)
obstacles.append((x + 1, y + 1)) # Adjust for grid origin (1,1)
return list(set((round(x), round(y)) for x, y in obstacles))
# Function to validate if obstacles file contains valid coordinates
def validate_obstacles_file(file_path):
with open(file_path, ‘r’) as file:
for line in file:
if line.strip():
try:
x, y = map(int, line.strip().split(‘,’))
except ValueError:
return False
return True
# Load obstacles from file or image
obstacle_file_path = os.path.join(dir_path, ‘obstacles.txt’)
if os.path.exists(obstacle_file_path) and validate_obstacles_file(obstacle_file_path):
print("Loading obstacles from obstacles.txt…")
with open(obstacle_file_path, ‘r’) as file:
obstacles = [tuple(map(int, line.strip().split(‘,’))) for line in file if line.strip()]
else:
obstacles = load_obstacles_from_image(os.path.join(dir_path, ‘obstacles_bw.png’), grid_size_x, grid_size_y)
with open(obstacle_file_path, ‘w’) as file:
for x, y in obstacles:
file.write(f"{x},{y}n")
print(f"Loaded {len(obstacles)} obstacles")
# Apply obstacle offset
obstacles = [(x + obstacle_offset_x, y + obstacle_offset_y) for x, y in obstacles]
# Load points of interest (POI) from file
print("Loading points of interest…")
poi_file_path = os.path.join(dir_path, ‘poi.txt’)
poi_points = []
with open(poi_file_path, ‘r’) as file:
for line in file:
x, y = map(float, line.strip().split(‘,’))
poi_points.append((x, y))
print(f"Loaded {len(poi_points)} points of interest (POI)")
# Create maze for pathfinding
def create_maze(grid_size_x, grid_size_y, obstacles):
print("Creating maze…")
maze = np.zeros((grid_size_y + 1, grid_size_x + 1)) # Adjust for grid origin (1,1)
for x, y in obstacles:
maze[int(y)][int(x)] = 1
return maze
maze = create_maze(grid_size_x, grid_size_y, obstacles)
print("Maze created.")
print("Maze obstacles:")
print(np.argwhere(maze == 1))
# A* pathfinding algorithm
class Node:
def __init__(self, parent=None, position=None):
self.parent = parent
self.position = position
self.g = 0
self.h = 0
self.f = 0
def __eq__(self, other):
return self.position == other.position
def astar(maze, start, end):
print("Starting A* algorithm…")
start_node = Node(None, start)
end_node = Node(None, end)
open_list = []
closed_list = []
open_list.append(start_node)
iterations = 0
max_iterations = 10000 # Limit iterations for debugging
while open_list:
iterations += 1
if iterations > max_iterations:
print("Reached maximum iterations, stopping to avoid infinite loop.")
break
# Get the current node
current_node = open_list[0]
current_index = 0
for index, item in enumerate(open_list):
if item.f < current_node.f:
current_node = item
current_index = index
# Pop current off open list, add to closed list
open_list.pop(current_index)
closed_list.append(current_node)
# Found the goal
if current_node == end_node:
path = []
current = current_node
while current is not None:
path.append(current.position)
current = current.parent
print("Path found.")
return path[::-1] # Return reversed path
# Generate children
children = []
for new_position in [(0, -1), (0, 1), (-1, 0), (1, 0), (-1, -1), (-1, 1), (1, -1), (1, 1)]: # Adjacent squares
# Get node position
node_position = (current_node.position[0] + new_position[0], current_node.position[1] + new_position[1])
# Make sure within range
if node_position[0] > (len(maze) – 1) or node_position[0] < 0 or node_position[1] > (len(maze[len(maze) – 1]) – 1) or node_position[1] < 0:
continue
# Make sure walkable terrain
if maze[node_position[1]][node_position[0]] != 0: # Note the inversion of indices here
continue
# Create new node
new_node = Node(current_node, node_position)
# Append
children.append(new_node)
# Loop through children
for child in children:
# Child is on the closed list
if child in closed_list:
continue
# Create the f, g, and h values
child.g = current_node.g + 1
child.h = ((child.position[0] – end_node.position[0]) ** 2) + ((child.position[1] – end_node.position[1]) ** 2)
child.f = child.g + child.h
# Child is already in the open list
if any(open_node for open_node in open_list if child == open_node and child.g > open_node.g):
continue
# Add the child to the open list
open_list.append(child)
if iterations % 1000 == 0:
print(f"Iteration {iterations}: Open list size: {len(open_list)}, Closed list size: {len(closed_list)}")
print("No path found.")
return []
def plot_path(ax, path):
if path:
path_x, path_y = zip(*path)
ax.plot(path_x, path_y, color=’blue’, linewidth=2, label=’Path’)
# Initial start and end points for testing
start_point = (255, 233)
end_point = (240, 240)
start_point_maze = (int(start_point[0]), int(start_point[1])) # Adjust for maze coordinates
end_point_maze = (int(end_point[0]), int(end_point[1])) # Adjust for maze coordinates
print(f"Running A* from {start_point_maze} to {end_point_maze}…")
path = astar(maze, start_point_maze, end_point_maze)
# Plot the results
print("Plotting results…")
fig, ax = plt.subplots(figsize=(10, 10))
ax.imshow(background_image, extent=[image_offset_x, grid_size_x + image_offset_x, grid_size_y + image_offset_y, image_offset_y], origin=’upper’)
obstacles_patches = [] # List to store obstacle patches
if obstacles:
for (x, y) in obstacles:
rect = Rectangle((x – 0.25, y – 0.25), 0.5, 0.5, linewidth=1, edgecolor=’red’, facecolor=’red’)
obstacles_patches.append(rect)
ax.add_patch(rect)
if poi_points:
px, py = zip(*poi_points)
ax.scatter(px, py, c=’blue’, s=10, label=’POIs’)
plot_path(ax, path)
ax.scatter(start_point[0], start_point[1], c=’green’, s=50, label=’Start’)
ax.scatter(end_point[0], end_point[1], c=’purple’, s=50, label=’End’)
ax.set_title(‘Background Image with Obstacles, POIs, and Path’)
ax.legend()
# Toggle obstacles visibility
def toggle_obstacles(event):
for patch in obstacles_patches:
patch.set_visible(not patch.get_visible())
plt.draw()
# Add button to toggle obstacles
ax_button = plt.axes([0.8, 0.05, 0.1, 0.075])
button = Button(ax_button, ‘Toggle Obstacles’)
button.on_clicked(toggle_obstacles)
plt.show()
print("Finished plotting.")I have a map. On this map i have known x,y positions and the know origin value (1,1) and max value(419,419). when given into matlablip i get very close to accurate values at the center of the map but near the top and bottom they vary by 5 or 6 units. almost the like image is being gently stretched from the middle out. i assume this is to bind it the the grid size.
My map image is 2048×2048 pixels. and i am constraining the map to a 419×419 grid. I’m assuming that due to the way its scaling the image im getting this strech but i’m unable to see what settings might fix this.
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image
import os
from matplotlib.patches import Rectangle
from matplotlib.widgets import Button
# Directory path
dir_path = ‘MY_DIR/’
# Load background image
print("Loading background image…")
background_image_path = os.path.join(dir_path, ‘MY_IMAGE’)
background_image = Image.open(background_image_path)
# Load grid size and offsets from file
print("Loading grid size, obstacle offset, and image offset…")
size_file_path = os.path.join(dir_path, ‘size.txt’)
with open(size_file_path, ‘r’) as file:
grid_size_x, grid_size_y = map(int, file.readline().strip().split(‘,’))
obstacle_offset_x, obstacle_offset_y = map(float, file.readline().strip().split(‘,’))
image_offset_x, image_offset_y = map(float, file.readline().strip().split(‘,’))
print(f"Grid size: {grid_size_x}, {grid_size_y}")
print(f"Obstacle offset: {obstacle_offset_x}, {obstacle_offset_y}")
print(f"Image offset: {image_offset_x}, {image_offset_y}")
# Function to load obstacles from B&W image
def load_obstacles_from_image(image_path, grid_size_x, grid_size_y):
print("Loading obstacles from B&W image…")
bw_image = Image.open(image_path).convert(‘L’)
bw_image = bw_image.resize((grid_size_x, grid_size_y))
bw_array = np.array(bw_image)
obstacles = []
for y in range(grid_size_y):
for x in range(grid_size_x):
if bw_array[y, x] < 128: # Assuming obstacles are black (value < 128)
obstacles.append((x + 1, y + 1)) # Adjust for grid origin (1,1)
return list(set((round(x), round(y)) for x, y in obstacles))
# Function to validate if obstacles file contains valid coordinates
def validate_obstacles_file(file_path):
with open(file_path, ‘r’) as file:
for line in file:
if line.strip():
try:
x, y = map(int, line.strip().split(‘,’))
except ValueError:
return False
return True
# Load obstacles from file or image
obstacle_file_path = os.path.join(dir_path, ‘obstacles.txt’)
if os.path.exists(obstacle_file_path) and validate_obstacles_file(obstacle_file_path):
print("Loading obstacles from obstacles.txt…")
with open(obstacle_file_path, ‘r’) as file:
obstacles = [tuple(map(int, line.strip().split(‘,’))) for line in file if line.strip()]
else:
obstacles = load_obstacles_from_image(os.path.join(dir_path, ‘obstacles_bw.png’), grid_size_x, grid_size_y)
with open(obstacle_file_path, ‘w’) as file:
for x, y in obstacles:
file.write(f"{x},{y}n")
print(f"Loaded {len(obstacles)} obstacles")
# Apply obstacle offset
obstacles = [(x + obstacle_offset_x, y + obstacle_offset_y) for x, y in obstacles]
# Load points of interest (POI) from file
print("Loading points of interest…")
poi_file_path = os.path.join(dir_path, ‘poi.txt’)
poi_points = []
with open(poi_file_path, ‘r’) as file:
for line in file:
x, y = map(float, line.strip().split(‘,’))
poi_points.append((x, y))
print(f"Loaded {len(poi_points)} points of interest (POI)")
# Create maze for pathfinding
def create_maze(grid_size_x, grid_size_y, obstacles):
print("Creating maze…")
maze = np.zeros((grid_size_y + 1, grid_size_x + 1)) # Adjust for grid origin (1,1)
for x, y in obstacles:
maze[int(y)][int(x)] = 1
return maze
maze = create_maze(grid_size_x, grid_size_y, obstacles)
print("Maze created.")
print("Maze obstacles:")
print(np.argwhere(maze == 1))
# A* pathfinding algorithm
class Node:
def __init__(self, parent=None, position=None):
self.parent = parent
self.position = position
self.g = 0
self.h = 0
self.f = 0
def __eq__(self, other):
return self.position == other.position
def astar(maze, start, end):
print("Starting A* algorithm…")
start_node = Node(None, start)
end_node = Node(None, end)
open_list = []
closed_list = []
open_list.append(start_node)
iterations = 0
max_iterations = 10000 # Limit iterations for debugging
while open_list:
iterations += 1
if iterations > max_iterations:
print("Reached maximum iterations, stopping to avoid infinite loop.")
break
# Get the current node
current_node = open_list[0]
current_index = 0
for index, item in enumerate(open_list):
if item.f < current_node.f:
current_node = item
current_index = index
# Pop current off open list, add to closed list
open_list.pop(current_index)
closed_list.append(current_node)
# Found the goal
if current_node == end_node:
path = []
current = current_node
while current is not None:
path.append(current.position)
current = current.parent
print("Path found.")
return path[::-1] # Return reversed path
# Generate children
children = []
for new_position in [(0, -1), (0, 1), (-1, 0), (1, 0), (-1, -1), (-1, 1), (1, -1), (1, 1)]: # Adjacent squares
# Get node position
node_position = (current_node.position[0] + new_position[0], current_node.position[1] + new_position[1])
# Make sure within range
if node_position[0] > (len(maze) – 1) or node_position[0] < 0 or node_position[1] > (len(maze[len(maze) – 1]) – 1) or node_position[1] < 0:
continue
# Make sure walkable terrain
if maze[node_position[1]][node_position[0]] != 0: # Note the inversion of indices here
continue
# Create new node
new_node = Node(current_node, node_position)
# Append
children.append(new_node)
# Loop through children
for child in children:
# Child is on the closed list
if child in closed_list:
continue
# Create the f, g, and h values
child.g = current_node.g + 1
child.h = ((child.position[0] – end_node.position[0]) ** 2) + ((child.position[1] – end_node.position[1]) ** 2)
child.f = child.g + child.h
# Child is already in the open list
if any(open_node for open_node in open_list if child == open_node and child.g > open_node.g):
continue
# Add the child to the open list
open_list.append(child)
if iterations % 1000 == 0:
print(f"Iteration {iterations}: Open list size: {len(open_list)}, Closed list size: {len(closed_list)}")
print("No path found.")
return []
def plot_path(ax, path):
if path:
path_x, path_y = zip(*path)
ax.plot(path_x, path_y, color=’blue’, linewidth=2, label=’Path’)
# Initial start and end points for testing
start_point = (255, 233)
end_point = (240, 240)
start_point_maze = (int(start_point[0]), int(start_point[1])) # Adjust for maze coordinates
end_point_maze = (int(end_point[0]), int(end_point[1])) # Adjust for maze coordinates
print(f"Running A* from {start_point_maze} to {end_point_maze}…")
path = astar(maze, start_point_maze, end_point_maze)
# Plot the results
print("Plotting results…")
fig, ax = plt.subplots(figsize=(10, 10))
ax.imshow(background_image, extent=[image_offset_x, grid_size_x + image_offset_x, grid_size_y + image_offset_y, image_offset_y], origin=’upper’)
obstacles_patches = [] # List to store obstacle patches
if obstacles:
for (x, y) in obstacles:
rect = Rectangle((x – 0.25, y – 0.25), 0.5, 0.5, linewidth=1, edgecolor=’red’, facecolor=’red’)
obstacles_patches.append(rect)
ax.add_patch(rect)
if poi_points:
px, py = zip(*poi_points)
ax.scatter(px, py, c=’blue’, s=10, label=’POIs’)
plot_path(ax, path)
ax.scatter(start_point[0], start_point[1], c=’green’, s=50, label=’Start’)
ax.scatter(end_point[0], end_point[1], c=’purple’, s=50, label=’End’)
ax.set_title(‘Background Image with Obstacles, POIs, and Path’)
ax.legend()
# Toggle obstacles visibility
def toggle_obstacles(event):
for patch in obstacles_patches:
patch.set_visible(not patch.get_visible())
plt.draw()
# Add button to toggle obstacles
ax_button = plt.axes([0.8, 0.05, 0.1, 0.075])
button = Button(ax_button, ‘Toggle Obstacles’)
button.on_clicked(toggle_obstacles)
plt.show()
print("Finished plotting.") I have a map. On this map i have known x,y positions and the know origin value (1,1) and max value(419,419). when given into matlablip i get very close to accurate values at the center of the map but near the top and bottom they vary by 5 or 6 units. almost the like image is being gently stretched from the middle out. i assume this is to bind it the the grid size.
My map image is 2048×2048 pixels. and i am constraining the map to a 419×419 grid. I’m assuming that due to the way its scaling the image im getting this strech but i’m unable to see what settings might fix this.
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image
import os
from matplotlib.patches import Rectangle
from matplotlib.widgets import Button
# Directory path
dir_path = ‘MY_DIR/’
# Load background image
print("Loading background image…")
background_image_path = os.path.join(dir_path, ‘MY_IMAGE’)
background_image = Image.open(background_image_path)
# Load grid size and offsets from file
print("Loading grid size, obstacle offset, and image offset…")
size_file_path = os.path.join(dir_path, ‘size.txt’)
with open(size_file_path, ‘r’) as file:
grid_size_x, grid_size_y = map(int, file.readline().strip().split(‘,’))
obstacle_offset_x, obstacle_offset_y = map(float, file.readline().strip().split(‘,’))
image_offset_x, image_offset_y = map(float, file.readline().strip().split(‘,’))
print(f"Grid size: {grid_size_x}, {grid_size_y}")
print(f"Obstacle offset: {obstacle_offset_x}, {obstacle_offset_y}")
print(f"Image offset: {image_offset_x}, {image_offset_y}")
# Function to load obstacles from B&W image
def load_obstacles_from_image(image_path, grid_size_x, grid_size_y):
print("Loading obstacles from B&W image…")
bw_image = Image.open(image_path).convert(‘L’)
bw_image = bw_image.resize((grid_size_x, grid_size_y))
bw_array = np.array(bw_image)
obstacles = []
for y in range(grid_size_y):
for x in range(grid_size_x):
if bw_array[y, x] < 128: # Assuming obstacles are black (value < 128)
obstacles.append((x + 1, y + 1)) # Adjust for grid origin (1,1)
return list(set((round(x), round(y)) for x, y in obstacles))
# Function to validate if obstacles file contains valid coordinates
def validate_obstacles_file(file_path):
with open(file_path, ‘r’) as file:
for line in file:
if line.strip():
try:
x, y = map(int, line.strip().split(‘,’))
except ValueError:
return False
return True
# Load obstacles from file or image
obstacle_file_path = os.path.join(dir_path, ‘obstacles.txt’)
if os.path.exists(obstacle_file_path) and validate_obstacles_file(obstacle_file_path):
print("Loading obstacles from obstacles.txt…")
with open(obstacle_file_path, ‘r’) as file:
obstacles = [tuple(map(int, line.strip().split(‘,’))) for line in file if line.strip()]
else:
obstacles = load_obstacles_from_image(os.path.join(dir_path, ‘obstacles_bw.png’), grid_size_x, grid_size_y)
with open(obstacle_file_path, ‘w’) as file:
for x, y in obstacles:
file.write(f"{x},{y}n")
print(f"Loaded {len(obstacles)} obstacles")
# Apply obstacle offset
obstacles = [(x + obstacle_offset_x, y + obstacle_offset_y) for x, y in obstacles]
# Load points of interest (POI) from file
print("Loading points of interest…")
poi_file_path = os.path.join(dir_path, ‘poi.txt’)
poi_points = []
with open(poi_file_path, ‘r’) as file:
for line in file:
x, y = map(float, line.strip().split(‘,’))
poi_points.append((x, y))
print(f"Loaded {len(poi_points)} points of interest (POI)")
# Create maze for pathfinding
def create_maze(grid_size_x, grid_size_y, obstacles):
print("Creating maze…")
maze = np.zeros((grid_size_y + 1, grid_size_x + 1)) # Adjust for grid origin (1,1)
for x, y in obstacles:
maze[int(y)][int(x)] = 1
return maze
maze = create_maze(grid_size_x, grid_size_y, obstacles)
print("Maze created.")
print("Maze obstacles:")
print(np.argwhere(maze == 1))
# A* pathfinding algorithm
class Node:
def __init__(self, parent=None, position=None):
self.parent = parent
self.position = position
self.g = 0
self.h = 0
self.f = 0
def __eq__(self, other):
return self.position == other.position
def astar(maze, start, end):
print("Starting A* algorithm…")
start_node = Node(None, start)
end_node = Node(None, end)
open_list = []
closed_list = []
open_list.append(start_node)
iterations = 0
max_iterations = 10000 # Limit iterations for debugging
while open_list:
iterations += 1
if iterations > max_iterations:
print("Reached maximum iterations, stopping to avoid infinite loop.")
break
# Get the current node
current_node = open_list[0]
current_index = 0
for index, item in enumerate(open_list):
if item.f < current_node.f:
current_node = item
current_index = index
# Pop current off open list, add to closed list
open_list.pop(current_index)
closed_list.append(current_node)
# Found the goal
if current_node == end_node:
path = []
current = current_node
while current is not None:
path.append(current.position)
current = current.parent
print("Path found.")
return path[::-1] # Return reversed path
# Generate children
children = []
for new_position in [(0, -1), (0, 1), (-1, 0), (1, 0), (-1, -1), (-1, 1), (1, -1), (1, 1)]: # Adjacent squares
# Get node position
node_position = (current_node.position[0] + new_position[0], current_node.position[1] + new_position[1])
# Make sure within range
if node_position[0] > (len(maze) – 1) or node_position[0] < 0 or node_position[1] > (len(maze[len(maze) – 1]) – 1) or node_position[1] < 0:
continue
# Make sure walkable terrain
if maze[node_position[1]][node_position[0]] != 0: # Note the inversion of indices here
continue
# Create new node
new_node = Node(current_node, node_position)
# Append
children.append(new_node)
# Loop through children
for child in children:
# Child is on the closed list
if child in closed_list:
continue
# Create the f, g, and h values
child.g = current_node.g + 1
child.h = ((child.position[0] – end_node.position[0]) ** 2) + ((child.position[1] – end_node.position[1]) ** 2)
child.f = child.g + child.h
# Child is already in the open list
if any(open_node for open_node in open_list if child == open_node and child.g > open_node.g):
continue
# Add the child to the open list
open_list.append(child)
if iterations % 1000 == 0:
print(f"Iteration {iterations}: Open list size: {len(open_list)}, Closed list size: {len(closed_list)}")
print("No path found.")
return []
def plot_path(ax, path):
if path:
path_x, path_y = zip(*path)
ax.plot(path_x, path_y, color=’blue’, linewidth=2, label=’Path’)
# Initial start and end points for testing
start_point = (255, 233)
end_point = (240, 240)
start_point_maze = (int(start_point[0]), int(start_point[1])) # Adjust for maze coordinates
end_point_maze = (int(end_point[0]), int(end_point[1])) # Adjust for maze coordinates
print(f"Running A* from {start_point_maze} to {end_point_maze}…")
path = astar(maze, start_point_maze, end_point_maze)
# Plot the results
print("Plotting results…")
fig, ax = plt.subplots(figsize=(10, 10))
ax.imshow(background_image, extent=[image_offset_x, grid_size_x + image_offset_x, grid_size_y + image_offset_y, image_offset_y], origin=’upper’)
obstacles_patches = [] # List to store obstacle patches
if obstacles:
for (x, y) in obstacles:
rect = Rectangle((x – 0.25, y – 0.25), 0.5, 0.5, linewidth=1, edgecolor=’red’, facecolor=’red’)
obstacles_patches.append(rect)
ax.add_patch(rect)
if poi_points:
px, py = zip(*poi_points)
ax.scatter(px, py, c=’blue’, s=10, label=’POIs’)
plot_path(ax, path)
ax.scatter(start_point[0], start_point[1], c=’green’, s=50, label=’Start’)
ax.scatter(end_point[0], end_point[1], c=’purple’, s=50, label=’End’)
ax.set_title(‘Background Image with Obstacles, POIs, and Path’)
ax.legend()
# Toggle obstacles visibility
def toggle_obstacles(event):
for patch in obstacles_patches:
patch.set_visible(not patch.get_visible())
plt.draw()
# Add button to toggle obstacles
ax_button = plt.axes([0.8, 0.05, 0.1, 0.075])
button = Button(ax_button, ‘Toggle Obstacles’)
button.on_clicked(toggle_obstacles)
plt.show()
print("Finished plotting.") python, discrete, quantization, map image MATLAB Answers — New Questions
The layout of the Downloads folder keeps resetting to default.
I noticed that “shell folders” cannot be customized as a group. My main concern lies with my Downloads folder, which I frequently use. Unlike the Documents folder on my C: drive, I do not utilize it.
Despite constantly customizing the layout of my Downloads folder, it reverts to the default settings every time I restart my computer and log into Windows. How can I ensure that my customized settings for the Downloads folder stick? Whenever I customize it or any folder on my portable drive, I designate it as a Documents folder. I never opt for General Items, Pictures, Music, or Videos. Additionally, I consistently choose the same 13 columns.
Your guidance on this matter would be greatly appreciated. Thank you.
I noticed that “shell folders” cannot be customized as a group. My main concern lies with my Downloads folder, which I frequently use. Unlike the Documents folder on my C: drive, I do not utilize it. Despite constantly customizing the layout of my Downloads folder, it reverts to the default settings every time I restart my computer and log into Windows. How can I ensure that my customized settings for the Downloads folder stick? Whenever I customize it or any folder on my portable drive, I designate it as a Documents folder. I never opt for General Items, Pictures, Music, or Videos. Additionally, I consistently choose the same 13 columns. Your guidance on this matter would be greatly appreciated. Thank you. Read More
Bad quality video on macOS RD client
Remote PC: AMD Ryzen 8845HS (7840HS tested too) Win 11 24h2 insider preview, enabled HEVC encoding for RDP
I see the problem only on the macOS RD client (not seen on iPad OS).
Unity-based apps/games, playing videos, and accessing the desktop are highly likely to find glitches.
Please check the screenshot.
Remote PC: AMD Ryzen 8845HS (7840HS tested too) Win 11 24h2 insider preview, enabled HEVC encoding for RDP I see the problem only on the macOS RD client (not seen on iPad OS).Unity-based apps/games, playing videos, and accessing the desktop are highly likely to find glitches. Please check the screenshot. Read More
Set up PSTN calls for Teams
Hello
Please i need your help on this issue.
I would like to know how to set up PSTN calls for Teams
Hello Please i need your help on this issue. I would like to know how to set up PSTN calls for Teams Read More
Sharing Files but Email Notification Not Received
For the past week whenever we share a file the recipient is not receiving the email notification that a file has been shared with them. We’re manually having to copy the shared link and send an additional email to let them know we’ve shared a file. Can someone share some insight?
Thanks!
For the past week whenever we share a file the recipient is not receiving the email notification that a file has been shared with them. We’re manually having to copy the shared link and send an additional email to let them know we’ve shared a file. Can someone share some insight? Thanks! Read More
Copying a column list of contacts and update an online list
Hello all!
I need help to create an automatic flow that copies the given column information, in this case the list of contacts and the extracted list of numbers (this to be scheduled once a week) to be pasted to an online excel list that notifies a respective team.
Can you please help me?
Thank you!
Hello all! I need help to create an automatic flow that copies the given column information, in this case the list of contacts and the extracted list of numbers (this to be scheduled once a week) to be pasted to an online excel list that notifies a respective team.Can you please help me? Thank you! Read More
Users being removed
I have several courses scheduled with multiple customers booked on. If a new customer books onto an existing course, it removes all the other customer information and only shows the customer that just booked.
The customers do not receive a cancellation notice and are still technically booked on the course but my calendar just shows the 1 person.
I have several courses scheduled with multiple customers booked on. If a new customer books onto an existing course, it removes all the other customer information and only shows the customer that just booked.The customers do not receive a cancellation notice and are still technically booked on the course but my calendar just shows the 1 person. Read More
message on the booking page to customers
Can I display a message on the booking page if there are no more appointment slots available ? For example: If there are no more slots available or if no slot suits you, please contact us at xxxxxx.
Thank you !
Can I display a message on the booking page if there are no more appointment slots available ? For example: If there are no more slots available or if no slot suits you, please contact us at xxxxxx.Thank you ! Read More
SharePoint Online Form width has changed
Why has the 3 column width been changed to 1 column? This has impacted all sites and lists. I found one other person who reported this when searching but need to know if anyone has any workarounds as this makes editing list entries with lots of columns very unwieldy.
Why has the 3 column width been changed to 1 column? This has impacted all sites and lists. I found one other person who reported this when searching but need to know if anyone has any workarounds as this makes editing list entries with lots of columns very unwieldy. Read More