Category: News
Vector Image Search using Azure OpenAI & AI Search: A Technical Guide
GitHub Repository: azure-ai-vision-search
Introduction
Vector image search uses AI to revolutionize how we find and retrieve images. This article explains how to combine Azure OpenAI and Azure AI Search for an efficient solution. We’ll cover setup, deployment, and usage to guide AI developers and engineers. We’ll focus on the search and vectorize methods in the function_app.py Python file, crucial for integrating Azure’s AI services for vector image searches. This technology is ideal for applications like e-commerce and digital asset management.
We dive into the core functionalities of the Azure AI Search service, focusing on the search and vectorize methods in the function_app.py python file. These methods are pivotal in integrating Azure’s AI services to perform vector image searches.
Prerequisites
An Azure account with an active subscription. Create an account for free.
An Azure Storage account for storing images. Create a storage account.
An Azure AI Search service for any tier and any region Create a service or find an existing service under your current subscription.
An Azure OpenAI service for any tier and any region. Create a service.
Azure Functions setup for processing Create python function.
Tools: Azure CLI, Visual Studio Code, and Postman for API testing.
AI Search Setup
Below are Azure AI Search schema files that define the index, indexer, and skillset used to store and process image data for efficient search and retrieval. These files are used to configure the Azure AI Search service to work with the vector image search solution.
> Action: Open the Azure AI Search service in the Azure portal and navigate to each section below to upload the corresponding JSON file.
1. Add Index
This defines the structure and schema of the search index, including specifying fields, data types, and attributes.
> Action: Go to the Indexes blade and create a new index using the JSON definition file vector-image-index-db.json.
2. Add Indexer
Set up an indexer to manage data ingestion from a source like Azure Storage to the search index.
> Action: Use the vector-image-indexer.json file in the Indexers blade to create a new indexer.
3. Add Skillset
Create a skillset to define the AI enrichment pipeline for image processing before indexing.
> Action: Use the JSON definition file vector-image-skillset.json to create a new skillset in the Skillsets blade.
These components work together to enable the ingestion, transformation, and indexing of image data, allowing efficient search and retrieval using Azure AI Search service, with the indexer triggering the vectorize Azure Function for handling image embeddings.
Azure Function Setup
Variables
Configuration variables are stored in the local.settings.json file and should be set as part of the Azure Function Environment variables blade. Key variables to configure include:
export AZURE_OPENAI_API_KEY=<Your Azure OpenAI API Key>
export AZURE_OPENAI_ENDPOINT=<Your Azure OpenAI Endpoint>
export OPEN_AI_MODEL=gpt-35-turbo
export API_VERSION=2024-02-01
export AI_VISION_ENDPOINT=<Your Azure Vision Endpoint>
export AI_VISION_API_KEY=<Your Azure Vision API Key>
export AI_SEARCH_SERVICE_ENDPOINT=<Your Azure Search Service Endpoint>
export AZURE_SEARCH_ADMIN_KEY=<Your Azure Search Admin Key>
export AI_SEARCH_INDEX_NAME=<Your Azure Search Index Name>
export ACCOUNT_KEY=<Your Account Key>
> Action: Set these variables in the Azure Function App Configuration blade.
GitHub Action Workflow
The function is being deployed automatically using a GitHub Action workflow. The function app is responsible for processing image data and performing similarity searches using Azure AI Search. The function app consists of two main methods: vectorize and search.
The main-premium.yml GitHub Action workflow file automates the deployment of the function app. It triggers the deployment process whenever changes are pushed to the main branch. The workflow uses the Azure Functions action to deploy the function app to Azure.
> Action: For the workflow to work, you need to set up the following secrets in your GitHub repository:
AZURE_RBAC_CREDENTIALS: Azure service principal credentials with access to the Azure subscription. more details here.
AZURE_FUNCTIONAPP_PUBLISH_PROFILE_PREMIUM: Publish profile for the Azure Function app. more details here.
Testing the Solution
vectorize
Uploading Files to the storage and then running the Azure AI search Indexer for embedding generation.
Use Azure Storage Explorer or Azure CLI for uploading images to the container.
Goto your AI Search service, run the indexer to process and vectorize images.
Monitor the indexing process via Azure Portal.
search
Using the Search API to Vector Search for Images, Leverage the Azure Search API to perform vector searches.
Construct the search query with the image vector {query: “blue sky”}.
Execute the query using Postman or code.
Interpret the search results to find similar images.
Azure Function Explained
The below sections explain the core functionalities of the Azure Function app, focusing on the vectorize and search methods in the function_app.py Python file. These methods are pivotal in integrating Azure’s AI services to perform vector image searches.
The vectorize Method
The vectorize method is responsible for converting images into vector embeddings. This process involves several steps:
1. HTTP Request Handling
The method is triggered by a POST request containing image URLs and other metadata.
The request body is parsed to extract the values needed for processing.
2. Image Embedding Generation
The vectorize_images function is called with the extracted values. This function processes each image URL by invoking the vectorize_image helper function.
Within vectorize_image, a SAS token is created for secure access to the image stored in Azure Blob Storage.
The get_image_embeddings function from the helper module generates the embeddings using Azure’s Computer Vision API. The embeddings are numerical representations capturing the semantic content of the images.
3. Response Construction
The embeddings are assembled into a response payload.
The response is returned as a JSON object, making the embeddings available for downstream tasks such as indexing and searching.
By leveraging Azure’s Computer Vision API, the vectorize method transforms images into vectors. These vectors are numeric representations that encapsulate the images’ visual features, making them suitable for similarity searches.
Usage
# Example usage
image_urls = [“https://example.com/image1.jpg”, “https://example.com/image2.jpg”]
embeddings = vectorize_images(image_urls)
print(embeddings)
The search Method
The search method facilitates image similarity searches using vectors generated by the vectorize method. Here’s how it works:
1. HTTP Request Handling
The method is triggered by a POST request containing a query string and optional parameters like max_images.
2. Query Processing with OpenAI
The provided query is refined using the ask_openai function, which interacts with Azure OpenAI. This function rephrases the query to improve search accuracy.
The refined query is then converted into vector embeddings using the generate_embeddings_text function. This function utilizes Azure’s Computer Vision API to generate text embeddings.
3. Vector Search Execution
A VectorizedQuery object is created, containing the query embeddings and parameters for the search.
The search_client performs a vector search on the image vectors stored in the Azure AI Search index. This search identifies images whose vector embeddings are most similar to the query embeddings.
4. Result Compilation
The search results are compiled into a response payload. For each result, a SAS token is generated for secure access to the image.
The response is returned as a JSON object, containing the image URLs, titles, and search scores.
The search method integrates Azure OpenAI and Azure AI Search to perform efficient and accurate image similarity searches. By converting textual queries into vector embeddings, it ensures that the search results are relevant and precise.
Usage
# Example usage
query = “Find images of mountains”
search_results = search_images(query, max_images=5)
print(search_results)
Azure Resources
The azure-ai-vision-search repository leverages several Azure services to enable vector image searches:
Conclusion
Combining Azure OpenAI with Azure AI Search provides a powerful solution for vector image search. By following this guide, you can set up and deploy a robust search system to meet various business needs. Explore further possibilities by integrating more advanced AI models and expanding your search capabilities.
Microsoft Tech Community – Latest Blogs –Read More
Known issue: Deleting the SSL/TLS Cipher Suites setting
We’ve recently identified an issue when removing either the SSL Cipher Suites setting from policies or remove targeting of a policy that contains the setting. When the setting is removed, the Windows platform doesn’t correctly process the ‘delete’ requested by the Intune service. In this scenario, the device honors a ‘blank value’ versus deleting the value.
Workaround
With Intune’s July (2407) service-side release, we’ve modified the behavior of our Intune service to disable deletion of the SSL Cipher Suites setting. This means that if you remove the setting from the policy, or remove targeting of a policy with the setting, Intune will leave the value in place. If you need to revert the platform back to its default value, you’ll need to deploy an additional policy by doing the following:
Navigate to the Microsoft Intune admin center.
Create a new policy (or policies) which explicitly sets the Cipher Suite defaults for each version of Windows operating system (OS) by using assignment filters and specific grouping based on OS version. To learn more about the Windows OS defaults, review Cipher Suites in TLS/SSL (Schannel SSP).
We’ll update this post as new information becomes available. If you have questions or comments for the Intune team, reply to this post or reach out on X @IntuneSuppTeam.
Microsoft Tech Community – Latest Blogs –Read More
How to interpolate at NaN values?
I have a vector [1 2 3 NaN 4 4.5 5.5 NaN NaN 6 6 7 NaN NaN NaN 8] and I want [1 2 3 3.5 4 4.5 5.5 5.75 5.75 6 6 7 7.5 7.5 7.5 8]. Is it possible to do this without a for cycle?I have a vector [1 2 3 NaN 4 4.5 5.5 NaN NaN 6 6 7 NaN NaN NaN 8] and I want [1 2 3 3.5 4 4.5 5.5 5.75 5.75 6 6 7 7.5 7.5 7.5 8]. Is it possible to do this without a for cycle? I have a vector [1 2 3 NaN 4 4.5 5.5 NaN NaN 6 6 7 NaN NaN NaN 8] and I want [1 2 3 3.5 4 4.5 5.5 5.75 5.75 6 6 7 7.5 7.5 7.5 8]. Is it possible to do this without a for cycle? for, vector, nan, interpolation MATLAB Answers — New Questions
Solving Eigenvalues of a system time-varying which is 5×5 matrix
I am trying to solve this system by using a desired eigenvalues to be equated to the det(SI-A) ,so every thing in that matrix is know except Lambda’s , I decoupled the problem by making eta_tilde=0 and then e =0 and I managed to obtain L and it was easier to get L in that way ,but the problem now is to obtain lambda that makes this matrix aysmptoically stable , SINCE it is linear time-varying w.r.t the error so according to lypunov it is better to check the stablity of (A^T+A) to place the eigenvalues to zero, it is complex to solve manually ,so I used the matlab to get the det(SI-A) symbolically ,but how to solve for lambda’s.I am trying to solve this system by using a desired eigenvalues to be equated to the det(SI-A) ,so every thing in that matrix is know except Lambda’s , I decoupled the problem by making eta_tilde=0 and then e =0 and I managed to obtain L and it was easier to get L in that way ,but the problem now is to obtain lambda that makes this matrix aysmptoically stable , SINCE it is linear time-varying w.r.t the error so according to lypunov it is better to check the stablity of (A^T+A) to place the eigenvalues to zero, it is complex to solve manually ,so I used the matlab to get the det(SI-A) symbolically ,but how to solve for lambda’s. I am trying to solve this system by using a desired eigenvalues to be equated to the det(SI-A) ,so every thing in that matrix is know except Lambda’s , I decoupled the problem by making eta_tilde=0 and then e =0 and I managed to obtain L and it was easier to get L in that way ,but the problem now is to obtain lambda that makes this matrix aysmptoically stable , SINCE it is linear time-varying w.r.t the error so according to lypunov it is better to check the stablity of (A^T+A) to place the eigenvalues to zero, it is complex to solve manually ,so I used the matlab to get the det(SI-A) symbolically ,but how to solve for lambda’s. #eigenvalues #stablity #ltv MATLAB Answers — New Questions
Data extract from SAP MM
Hello Team,
Can we extract data from SAP ECC & GTS table using Azure data factory? If yes then what will be the pre-requisite to fetch data like query language can be SQL. Do we need to create self-hosted IR or auto IR is fine. Right now the data model is in HANA so need to replace with Azure using ADF.
Thank in advance.
Hello Team, Can we extract data from SAP ECC & GTS table using Azure data factory? If yes then what will be the pre-requisite to fetch data like query language can be SQL. Do we need to create self-hosted IR or auto IR is fine. Right now the data model is in HANA so need to replace with Azure using ADF. Thank in advance. Read More
Internal API : Virtual Network support for Power Platform
Hello Everyone,
We are using Custom Connectors from Power Automate Flows to initiate a call to the Internal API that is hosted in Azure through the MuleSoft Data Gateway. Since we are unable to activate the private endpoint for this internal API, we are seeking guidance on how to securely connect to the API via V-Net integration. Please advise.
As per the Microsoft Documentation : Use custom connectors (preview) to securely connect to your services that are protected by private endpoints in Azure or services that are hosted within your private network.
https://learn.microsoft.com/en-us/power-platform/admin/vnet-support-overview
Thanks,
-Sri
Hello Everyone, We are using Custom Connectors from Power Automate Flows to initiate a call to the Internal API that is hosted in Azure through the MuleSoft Data Gateway. Since we are unable to activate the private endpoint for this internal API, we are seeking guidance on how to securely connect to the API via V-Net integration. Please advise.As per the Microsoft Documentation : Use custom connectors (preview) to securely connect to your services that are protected by private endpoints in Azure or services that are hosted within your private network. https://learn.microsoft.com/en-us/power-platform/admin/vnet-support-overview Thanks,-Sri Read More
Windows news you can use: July 2024
It’s time to explore the latest in Windows security, device management, Windows Server, productivity, and collaboration, plus some important lifecycle updates.
First, in response to the CrowdStrike issue impacting endpoints and servers, we issued a statement, released a signed Microsoft Recovery Tool, and followed up to share more on Windows resiliency: Best practices and the path forward. We then released an analysis of CrowdStrike’s outage report, offering details on how security vendors and organizations can use the flexibility and integrated capabilities of Windows for increased security and reliability. (For more information on Windows 11 security, see the Windows security book.)
Now let’s dig into recent enhancements and new features.
New in Windows security
[SECURE BOOT] If you need to deploy protections against the publicly disclosed Secure Boot security feature bypass (CVE-2023-24932), follow the new guidelines for a five-phase plan.
New in device management
[UPDATES] [PREVIEW] Prepare for optimized feature and quality updates with checkpoint cumulative updates, which will be available beginning with Windows 11, version 24H2. To help you update devices faster and utilize less bandwidth and hard disk resources, monthly update downloads will consist of two files: a cumulative checkpoint update package file and a new file that contains only the changes from the last checkpoint. Preview this experience today through the Windows Insiders Program Dev Channel.
[WINDOWS 365] [SECURITY BASELINE] Configuring security settings can be time consuming. Security baselines provide valuable policy templates that organizations can deploy via Microsoft Intune to establish Microsoft security–recommended settings with just a few clicks. This can help accelerate deployment of baseline version updates, improve UI and reporting experiences, and more. Check out Deploy security baselines for Windows 365 for more details.
[WINDOWS 365] Windows 365 Cross-region Disaster Recovery can create snapshots of Cloud PCs in geographically distant locations, allowing for quick recovery during disaster events. Designed for easy configuration and activation, even for those with minimal disaster recovery experience, it integrates with various reports so that you and your IT team can stay informed about progress and current statuses.
New in Windows Server
[HOTPATCH] Get the new Hotpatch baseline for Windows Server 2022 Datacenter: Azure Edition.
[SERVER] [PREVIEW] If you’re trying out Windows Server 2025, you can now use a new Windows Admin Center and a new account type known as delegated Managed Service Account (dMSA). You should receive these updates automatically as Windows Server Preview Build 26252 if you’ve signed up for Server Flighting.
[AZURE] [PREVIEW] You’re also welcome to preview Windows Server Datacenter: Azure Edition preview build 26244.
New in productivity and collaboration
With the July 2024 security update for Windows 11, version 23H2, you can now take advantage of the following:
[SHARING] Copy files from the Windows Share window using the new Copy button.
[FILE EXPLORER] Create 7-Zip and Tape Archive (TAR) files using the context menu’s Compress to options. Alternatively, check out a new compression wizard in Additional options. See selected files more easily thanks to a newly added border. Easily duplicate File Explorer tabs with a right click.
[DESKTOP] Find the show desktop button on the rightmost end of the taskbar by default. To configure it, right-click the taskbar and choose Taskbar settings > Taskbar behaviors.
[TASKBAR] Enjoy two productivity boosters for the taskbar. Drag apps from the Pinned section of the Start menu to pin them to the taskbar. Additionally, try using the WIN + T shortcut along with the first letter of the pinned app that you want to focus on.
Lifecycle turning points
[IoT LTSC] The Windows 11 IoT Enterprise LTSC 2024 90-day evaluation is now available. Windows 11 IoT Enterprise LTSC is designed for special-purpose devices requiring a 10-year support lifecycle consisting of monthly security and quality updates delivered via Windows Update. Since it shares core platform capabilities with Windows 11 Enterprise, it provides unparalleled intelligence, security, and flexibility at the edge and the same familiar development and management tools used for your desktop devices. For more information, see What’s new in Windows 11 IoT Enterprise LTSC 2024.
Now in Windows Insider Preview Builds
[ANDROID] [FILE EXPLORER] Configure compatible Android devices to share content easily and safely with compatible Windows devices. Just pair your Android device to your Windows PC to leverage File Explorer to open, copy/paste/rename files, and/or move/delete them as necessary. For more information, see Ability to access your Android phone in File Explorer begins rolling out to Windows Insiders.
Which of these highlights do you care most about? What would you like to see more of? Technology evolves faster than ever, and we’re here (and listening!) to set you up for success with the right information and resources! Please let us know more in the comments section below.
Continue the conversation. Find best practices. Bookmark the Windows Tech Community, then follow us @MSWindowsITPro on X and on LinkedIn. Looking for support? Visit Windows on Microsoft Q&A.
Microsoft Tech Community – Latest Blogs –Read More
Filling a shape with Geoplot
I am creating a polygon using coordinate points with geoplot, and I would like to fill the resultant shape in a partially transparent blue color. I am able to create the filled shape, and I can overlay the outline on the map with geoplot, but I cannot do both.
%% Plot
% Create a figure
figure;
% Create a geographic axes
gx = geoaxes;
hold(gx, ‘on’);
% Define the indices of visible points
visibleIndices = maxRadiusPerAngle > 0;
% Close the loop by adding the first point at the end
latTargetsClosed = [latTargets(visibleIndices) latTargets(visibleIndices(1))];
lonTargetsClosed = [lonTargets(visibleIndices) lonTargets(visibleIndices(1))];
% Plot the outline of the polygon using geoplot
geoplot(gx, latTargetsClosed, lonTargetsClosed, ‘b-‘, ‘LineWidth’, 2);
% Plot the central point
geoplot(gx, latCenter, lonCenter, ‘ro’, ‘MarkerSize’, 8, ‘MarkerFaceColor’, ‘r’);
% Plot the visible points
geoplot(gx, latTargets(visibleIndices), lonTargets(visibleIndices), ‘go’, ‘MarkerSize’, 6, ‘MarkerFaceColor’, ‘g’);
% Set the basemap
geobasemap(gx, ‘streets’);
title(‘Furthest Outward Points with Positive LOS’);
% Define the Web Mercator projection
projCRS = projcrs(3857); % EPSG:3857 Web Mercator
% Convert geographic coordinates to projected coordinates
[x, y] = projfwd(projCRS, latTargetsClosed, lonTargetsClosed);
% Create a new Cartesian plot for the filled polygon, ensuring it overlays the geographic axes
figure;
hold on;
% Create a filled polygon in the Cartesian plot
fill(x, y, ‘b’, ‘FaceAlpha’, 0.3, ‘EdgeColor’, ‘none’);
% Set Cartesian axes limits to match the geographic plot
axis equal;
xlabel(‘X (meters)’);
ylabel(‘Y (meters)’);
title(‘Filled Polygon in Projected Coordinates’);
% Adjust the limits to fit the geographic plot
latlim = gx.LatitudeLimits;
lonlim = gx.LongitudeLimits;
[xlim, ylim] = projfwd(projCRS, [latlim(1), latlim(2)], [lonlim(1), lonlim(2)]);
set(gca, ‘XLim’, xlim, ‘YLim’, ylim);
% Ensure the Cartesian plot is visible
set(gcf, ‘Visible’, ‘on’);I am creating a polygon using coordinate points with geoplot, and I would like to fill the resultant shape in a partially transparent blue color. I am able to create the filled shape, and I can overlay the outline on the map with geoplot, but I cannot do both.
%% Plot
% Create a figure
figure;
% Create a geographic axes
gx = geoaxes;
hold(gx, ‘on’);
% Define the indices of visible points
visibleIndices = maxRadiusPerAngle > 0;
% Close the loop by adding the first point at the end
latTargetsClosed = [latTargets(visibleIndices) latTargets(visibleIndices(1))];
lonTargetsClosed = [lonTargets(visibleIndices) lonTargets(visibleIndices(1))];
% Plot the outline of the polygon using geoplot
geoplot(gx, latTargetsClosed, lonTargetsClosed, ‘b-‘, ‘LineWidth’, 2);
% Plot the central point
geoplot(gx, latCenter, lonCenter, ‘ro’, ‘MarkerSize’, 8, ‘MarkerFaceColor’, ‘r’);
% Plot the visible points
geoplot(gx, latTargets(visibleIndices), lonTargets(visibleIndices), ‘go’, ‘MarkerSize’, 6, ‘MarkerFaceColor’, ‘g’);
% Set the basemap
geobasemap(gx, ‘streets’);
title(‘Furthest Outward Points with Positive LOS’);
% Define the Web Mercator projection
projCRS = projcrs(3857); % EPSG:3857 Web Mercator
% Convert geographic coordinates to projected coordinates
[x, y] = projfwd(projCRS, latTargetsClosed, lonTargetsClosed);
% Create a new Cartesian plot for the filled polygon, ensuring it overlays the geographic axes
figure;
hold on;
% Create a filled polygon in the Cartesian plot
fill(x, y, ‘b’, ‘FaceAlpha’, 0.3, ‘EdgeColor’, ‘none’);
% Set Cartesian axes limits to match the geographic plot
axis equal;
xlabel(‘X (meters)’);
ylabel(‘Y (meters)’);
title(‘Filled Polygon in Projected Coordinates’);
% Adjust the limits to fit the geographic plot
latlim = gx.LatitudeLimits;
lonlim = gx.LongitudeLimits;
[xlim, ylim] = projfwd(projCRS, [latlim(1), latlim(2)], [lonlim(1), lonlim(2)]);
set(gca, ‘XLim’, xlim, ‘YLim’, ylim);
% Ensure the Cartesian plot is visible
set(gcf, ‘Visible’, ‘on’); I am creating a polygon using coordinate points with geoplot, and I would like to fill the resultant shape in a partially transparent blue color. I am able to create the filled shape, and I can overlay the outline on the map with geoplot, but I cannot do both.
%% Plot
% Create a figure
figure;
% Create a geographic axes
gx = geoaxes;
hold(gx, ‘on’);
% Define the indices of visible points
visibleIndices = maxRadiusPerAngle > 0;
% Close the loop by adding the first point at the end
latTargetsClosed = [latTargets(visibleIndices) latTargets(visibleIndices(1))];
lonTargetsClosed = [lonTargets(visibleIndices) lonTargets(visibleIndices(1))];
% Plot the outline of the polygon using geoplot
geoplot(gx, latTargetsClosed, lonTargetsClosed, ‘b-‘, ‘LineWidth’, 2);
% Plot the central point
geoplot(gx, latCenter, lonCenter, ‘ro’, ‘MarkerSize’, 8, ‘MarkerFaceColor’, ‘r’);
% Plot the visible points
geoplot(gx, latTargets(visibleIndices), lonTargets(visibleIndices), ‘go’, ‘MarkerSize’, 6, ‘MarkerFaceColor’, ‘g’);
% Set the basemap
geobasemap(gx, ‘streets’);
title(‘Furthest Outward Points with Positive LOS’);
% Define the Web Mercator projection
projCRS = projcrs(3857); % EPSG:3857 Web Mercator
% Convert geographic coordinates to projected coordinates
[x, y] = projfwd(projCRS, latTargetsClosed, lonTargetsClosed);
% Create a new Cartesian plot for the filled polygon, ensuring it overlays the geographic axes
figure;
hold on;
% Create a filled polygon in the Cartesian plot
fill(x, y, ‘b’, ‘FaceAlpha’, 0.3, ‘EdgeColor’, ‘none’);
% Set Cartesian axes limits to match the geographic plot
axis equal;
xlabel(‘X (meters)’);
ylabel(‘Y (meters)’);
title(‘Filled Polygon in Projected Coordinates’);
% Adjust the limits to fit the geographic plot
latlim = gx.LatitudeLimits;
lonlim = gx.LongitudeLimits;
[xlim, ylim] = projfwd(projCRS, [latlim(1), latlim(2)], [lonlim(1), lonlim(2)]);
set(gca, ‘XLim’, xlim, ‘YLim’, ylim);
% Ensure the Cartesian plot is visible
set(gcf, ‘Visible’, ‘on’); geoplot, mapping toolbox MATLAB Answers — New Questions
lsqcurvefit issues due to variables being several orders of magnitude different
I am trying to use lsqcurvefit to fit an equation to some data in order to solve for a couple variables. I have included the part of the code below that covers this. I am trying to solve for coeff(1) and coeff(2), The problem is that when I run lsqcurvefit, it is just using whatever my initial guesses are and outputting that as the solution. I suspect it is because my values for the coefficients will be several orders of magnitude different. You can kind of get an idea for this by looking at coeff0. Has anyone else run into this problem and/or do you know how to work around it? Any insight would be greatly appreciated.
load(‘V1.mat’)
load(‘Vp.mat’)
load(‘data.mat’)
V = [V1, Vp]; %voltages
a = 1.1792;
b = 0.5;
e = 1.60217662e-19;
Area = 4.7909e-7;
mi = 39.948./(6.022e23.*1000);
coeff0 = [7e10 4]; %initial guess
Eqn7 = @(coeff, VV) e^1.5*coeff(1)*Area*sqrt(coeff(2)/(2*pi*mi))*100^3*… (a*(-VV(:,1)/coeff(2)).^b.*tanh(VV(:,2)/(2*coeff(2))) + …
(a*(-VV(:,1)/coeff(2)).^b – a*(-(VV(:,1)+VV(:,2))/coeff(2)).^b)./(exp(VV(:,2)/coeff(2))+1);
options = optimoptions(‘lsqcurvefit’,’Algorithm’,’levenberg-marquardt’,’OptimalityTolerance’,1e-16,’FunctionTolerance’,1e-16);
lb = [];
ub = [];
[vals, resnorm, out, flag] = lsqcurvefit(Eqn7, coeff0, V, data(:,2),lb,ub);
plot(data(:,1),data(:,2),’x’,data(:,1),Eqn7(vals,V),’b-‘)I am trying to use lsqcurvefit to fit an equation to some data in order to solve for a couple variables. I have included the part of the code below that covers this. I am trying to solve for coeff(1) and coeff(2), The problem is that when I run lsqcurvefit, it is just using whatever my initial guesses are and outputting that as the solution. I suspect it is because my values for the coefficients will be several orders of magnitude different. You can kind of get an idea for this by looking at coeff0. Has anyone else run into this problem and/or do you know how to work around it? Any insight would be greatly appreciated.
load(‘V1.mat’)
load(‘Vp.mat’)
load(‘data.mat’)
V = [V1, Vp]; %voltages
a = 1.1792;
b = 0.5;
e = 1.60217662e-19;
Area = 4.7909e-7;
mi = 39.948./(6.022e23.*1000);
coeff0 = [7e10 4]; %initial guess
Eqn7 = @(coeff, VV) e^1.5*coeff(1)*Area*sqrt(coeff(2)/(2*pi*mi))*100^3*… (a*(-VV(:,1)/coeff(2)).^b.*tanh(VV(:,2)/(2*coeff(2))) + …
(a*(-VV(:,1)/coeff(2)).^b – a*(-(VV(:,1)+VV(:,2))/coeff(2)).^b)./(exp(VV(:,2)/coeff(2))+1);
options = optimoptions(‘lsqcurvefit’,’Algorithm’,’levenberg-marquardt’,’OptimalityTolerance’,1e-16,’FunctionTolerance’,1e-16);
lb = [];
ub = [];
[vals, resnorm, out, flag] = lsqcurvefit(Eqn7, coeff0, V, data(:,2),lb,ub);
plot(data(:,1),data(:,2),’x’,data(:,1),Eqn7(vals,V),’b-‘) I am trying to use lsqcurvefit to fit an equation to some data in order to solve for a couple variables. I have included the part of the code below that covers this. I am trying to solve for coeff(1) and coeff(2), The problem is that when I run lsqcurvefit, it is just using whatever my initial guesses are and outputting that as the solution. I suspect it is because my values for the coefficients will be several orders of magnitude different. You can kind of get an idea for this by looking at coeff0. Has anyone else run into this problem and/or do you know how to work around it? Any insight would be greatly appreciated.
load(‘V1.mat’)
load(‘Vp.mat’)
load(‘data.mat’)
V = [V1, Vp]; %voltages
a = 1.1792;
b = 0.5;
e = 1.60217662e-19;
Area = 4.7909e-7;
mi = 39.948./(6.022e23.*1000);
coeff0 = [7e10 4]; %initial guess
Eqn7 = @(coeff, VV) e^1.5*coeff(1)*Area*sqrt(coeff(2)/(2*pi*mi))*100^3*… (a*(-VV(:,1)/coeff(2)).^b.*tanh(VV(:,2)/(2*coeff(2))) + …
(a*(-VV(:,1)/coeff(2)).^b – a*(-(VV(:,1)+VV(:,2))/coeff(2)).^b)./(exp(VV(:,2)/coeff(2))+1);
options = optimoptions(‘lsqcurvefit’,’Algorithm’,’levenberg-marquardt’,’OptimalityTolerance’,1e-16,’FunctionTolerance’,1e-16);
lb = [];
ub = [];
[vals, resnorm, out, flag] = lsqcurvefit(Eqn7, coeff0, V, data(:,2),lb,ub);
plot(data(:,1),data(:,2),’x’,data(:,1),Eqn7(vals,V),’b-‘) curve fitting MATLAB Answers — New Questions
Unable to draw the given inter-satellite path.
I wrote a Python script and got a path selection at a certain point as [‘Satellite_185’, ‘Satellite_113’, ‘Satellite_162’, ‘Satellite_108’, ‘Satellite_87’, ‘Satellite_68’, ‘Satellite_305’, ‘Satellite_335’, ‘Satellite_384’]. Then I wrote the following MATLAB code, but it gets stuck at the simulation scene step. I suspect it’s because of the time issue, but I can’t fix it.
% Create Satellite Scenario
startTime = datetime(2021,12,10,18,27,57); % 10 December 2021, 6:27:57 PM UTC
stopTime = startTime + hours(3); % 10 December 2021, 9:27:57 PM UTC
sampleTime = 60; % Seconds
sc = satelliteScenario(startTime,stopTime,sampleTime,"AutoSimulate",false);
% Load the entire constellation, but we’ll only use the specified relay satellites
satellites = satellite(sc,"largeConstellation2.tle");
% Known relay satellite names or identifiers (assuming you have them)
% If you only have indices, you’ll need to map them to satellite objects somehow
% Here we assume you have the satellite objects directly
% relaySats = {…}; % This should be filled with the actual satellite objects
% Example: relaySats = {satellites(10), satellites(20), satellites(30)};
% But since you likely have names or other identifiers, you’ll need to find them
% Or, if you have indices into the ‘satellites’ array
relaySatsIndices = [185, 113, 162, 108, 87, 68, 305, 335, 384]; % Example indices
relaySats = satellites(relaySatsIndices);
% Add Ground Stations
gsSource = groundStation(sc,42.3001,-71.3504, "Name","Source Ground Station");
gsTarget = groundStation(sc,17.4351,78.3824, "Name","Target Ground Station");
% Build the path using the known relay satellite sequence
pathNodes = {gsSource, relaySats, gsTarget};
% Visualize Path
sc.AutoSimulate = true;
ac = access(pathNodes{:});
ac.LineColor = "red";
% Determine Intervals When Calculated Path Can Be Used (if needed)
% intvls = accessIntervals(ac); % Uncomment this line if you need the access intervals
% Create satellite scenario viewer
v = satelliteScenarioViewer(sc,"ShowDetails",false);
% Note: Setting MarkerSize directly on the satellites object may not work as expected.
% Instead, adjust the visualization properties in the viewer or use a loop to set markers.
% Play the scenario
play(sc);
The code above references part of the code from this website:https://www.mathworks.com/help/satcom/ug/multihop-path-select-through-sat-constellation.html
This picture is my stuck interface after running in matlab.I wrote a Python script and got a path selection at a certain point as [‘Satellite_185’, ‘Satellite_113’, ‘Satellite_162’, ‘Satellite_108’, ‘Satellite_87’, ‘Satellite_68’, ‘Satellite_305’, ‘Satellite_335’, ‘Satellite_384’]. Then I wrote the following MATLAB code, but it gets stuck at the simulation scene step. I suspect it’s because of the time issue, but I can’t fix it.
% Create Satellite Scenario
startTime = datetime(2021,12,10,18,27,57); % 10 December 2021, 6:27:57 PM UTC
stopTime = startTime + hours(3); % 10 December 2021, 9:27:57 PM UTC
sampleTime = 60; % Seconds
sc = satelliteScenario(startTime,stopTime,sampleTime,"AutoSimulate",false);
% Load the entire constellation, but we’ll only use the specified relay satellites
satellites = satellite(sc,"largeConstellation2.tle");
% Known relay satellite names or identifiers (assuming you have them)
% If you only have indices, you’ll need to map them to satellite objects somehow
% Here we assume you have the satellite objects directly
% relaySats = {…}; % This should be filled with the actual satellite objects
% Example: relaySats = {satellites(10), satellites(20), satellites(30)};
% But since you likely have names or other identifiers, you’ll need to find them
% Or, if you have indices into the ‘satellites’ array
relaySatsIndices = [185, 113, 162, 108, 87, 68, 305, 335, 384]; % Example indices
relaySats = satellites(relaySatsIndices);
% Add Ground Stations
gsSource = groundStation(sc,42.3001,-71.3504, "Name","Source Ground Station");
gsTarget = groundStation(sc,17.4351,78.3824, "Name","Target Ground Station");
% Build the path using the known relay satellite sequence
pathNodes = {gsSource, relaySats, gsTarget};
% Visualize Path
sc.AutoSimulate = true;
ac = access(pathNodes{:});
ac.LineColor = "red";
% Determine Intervals When Calculated Path Can Be Used (if needed)
% intvls = accessIntervals(ac); % Uncomment this line if you need the access intervals
% Create satellite scenario viewer
v = satelliteScenarioViewer(sc,"ShowDetails",false);
% Note: Setting MarkerSize directly on the satellites object may not work as expected.
% Instead, adjust the visualization properties in the viewer or use a loop to set markers.
% Play the scenario
play(sc);
The code above references part of the code from this website:https://www.mathworks.com/help/satcom/ug/multihop-path-select-through-sat-constellation.html
This picture is my stuck interface after running in matlab. I wrote a Python script and got a path selection at a certain point as [‘Satellite_185’, ‘Satellite_113’, ‘Satellite_162’, ‘Satellite_108’, ‘Satellite_87’, ‘Satellite_68’, ‘Satellite_305’, ‘Satellite_335’, ‘Satellite_384’]. Then I wrote the following MATLAB code, but it gets stuck at the simulation scene step. I suspect it’s because of the time issue, but I can’t fix it.
% Create Satellite Scenario
startTime = datetime(2021,12,10,18,27,57); % 10 December 2021, 6:27:57 PM UTC
stopTime = startTime + hours(3); % 10 December 2021, 9:27:57 PM UTC
sampleTime = 60; % Seconds
sc = satelliteScenario(startTime,stopTime,sampleTime,"AutoSimulate",false);
% Load the entire constellation, but we’ll only use the specified relay satellites
satellites = satellite(sc,"largeConstellation2.tle");
% Known relay satellite names or identifiers (assuming you have them)
% If you only have indices, you’ll need to map them to satellite objects somehow
% Here we assume you have the satellite objects directly
% relaySats = {…}; % This should be filled with the actual satellite objects
% Example: relaySats = {satellites(10), satellites(20), satellites(30)};
% But since you likely have names or other identifiers, you’ll need to find them
% Or, if you have indices into the ‘satellites’ array
relaySatsIndices = [185, 113, 162, 108, 87, 68, 305, 335, 384]; % Example indices
relaySats = satellites(relaySatsIndices);
% Add Ground Stations
gsSource = groundStation(sc,42.3001,-71.3504, "Name","Source Ground Station");
gsTarget = groundStation(sc,17.4351,78.3824, "Name","Target Ground Station");
% Build the path using the known relay satellite sequence
pathNodes = {gsSource, relaySats, gsTarget};
% Visualize Path
sc.AutoSimulate = true;
ac = access(pathNodes{:});
ac.LineColor = "red";
% Determine Intervals When Calculated Path Can Be Used (if needed)
% intvls = accessIntervals(ac); % Uncomment this line if you need the access intervals
% Create satellite scenario viewer
v = satelliteScenarioViewer(sc,"ShowDetails",false);
% Note: Setting MarkerSize directly on the satellites object may not work as expected.
% Instead, adjust the visualization properties in the viewer or use a loop to set markers.
% Play the scenario
play(sc);
The code above references part of the code from this website:https://www.mathworks.com/help/satcom/ug/multihop-path-select-through-sat-constellation.html
This picture is my stuck interface after running in matlab. large satellite constellation MATLAB Answers — New Questions
Getting Started with Healthbot using Customer Generated Sources
I am trying to get our customer generated data from AI Search integrated with the Healthbot. Here are the steps:
1. Using OpenAI Studio, file upload in new storage container and specified AI Search instance and created a new Index. Validated the index could be searched based on the context of the single file upload.
2. Using OpenAI Studio, tested the chat function and it returned the right results and referenced the file
3. When entering Azure AI Search parameters in the data connection, I entered in the index name and key then chose Vector as the search type. I also verified my index fields is using contentVector.
The built scenario always falls back to medline and never returns the customer data, is there any recommendations on where to check? This use to work when using the import data wizard in AI Search but even that index fails to return results in healthbot but works just fine in AI Search.
I am trying to get our customer generated data from AI Search integrated with the Healthbot. Here are the steps: 1. Using OpenAI Studio, file upload in new storage container and specified AI Search instance and created a new Index. Validated the index could be searched based on the context of the single file upload.2. Using OpenAI Studio, tested the chat function and it returned the right results and referenced the file3. When entering Azure AI Search parameters in the data connection, I entered in the index name and key then chose Vector as the search type. I also verified my index fields is using contentVector. The built scenario always falls back to medline and never returns the customer data, is there any recommendations on where to check? This use to work when using the import data wizard in AI Search but even that index fails to return results in healthbot but works just fine in AI Search. Read More
Generate a report with generative AI | Data Exposed: MVP Edition
A data source (Azure SQL / MI / Fabric) may generate a report, eg. an annual report. In this episode, MVP Kay Sauter will demo how far you can get with this, as well as discuss the data source (Azure SQL / MI / Fabric) using WideWorldImporters or AdventureWorks.
Resources:
About Kay Sauter:
Kay Sauter has been working with SQL Server since 2013. His expertise covers SQL Server, Azure, Data Visualization, and Power BI. He is a Microsoft Data Platform MVP.
Kay blogs on kayondata.com and is actively involved in various community projects like Data TGIF, databash.live, data-conference.ch, and Data Platform Data Platform DEI Virtual Group.
He is based in Zurich, Switzerland and in his free time, together with his wife, he loves to travel to discover new cultures and perspectives.
About MVPs:
Microsoft Most Valuable Professionals, or MVPs, are technology experts who passionately share their knowledge with the community. They are always on the “bleeding edge” and have an unstoppable urge to get their hands on new, exciting technologies. They have very deep knowledge of Microsoft products and services, while also being able to bring together diverse platforms, products and solutions, to solve real world problems. MVPs make up a global community of over 4,000 technical experts and community leaders across 90 countries/regions and are driven by their passion, community spirit, and quest for knowledge. Above all and in addition to their amazing technical abilities, MVPs are always willing to help others – that’s what sets them apart. Learn more.
View/share our latest episodes on Microsoft Learn and YouTube!
Microsoft Tech Community – Latest Blogs –Read More
GCCH M365 Webinar (June): Info Protection and Sensitivity Labels and new Teams Update
Our June GCCH M365 Webinar: Connect – Collaborate – Create included a discussion around Microsoft Information Protection, the Purview Roadmap, and new Teams.
Recording here: https://www.microsoft.com/en-us/videoplayer/embed/RW1mCB7
Microsoft Tech Community – Latest Blogs –Read More
What’s New in Excel (July 2024)
Welcome to the July 2024 update. This month, use Copilot in Excel to unlock insights from data, work on data ranges resembling tables, and prompt for step-by-step instructions including formula examples! And not only is the Python Editor now available as an in-the-box option but also support for additional libraries to continue enhancing your data analysis and visualization capabilities directly in Excel is here for Insider users of Excel for Windows.
Excel for web, Windows, and Mac:
– Copilot in Excel: Unlocking insights from data
– Copilot in Excel: Expanded data structure support and comprehensive answers
Excel for web:
– Modernized Excel grid (part 1 & 2)
– Sync Forms data to Excel
Excel for Windows & Mac:
– Checkboxes in cells
– TRANSLATE & DETECTLANGUAGE functions (Insiders)
Excel for Windows:
– Python Editor (Insiders)
– Python in Excel: additional library support (Insiders)
Excel for Mac:
– Refresh data from Power Query’s From Folder connector #FIA
Excel for web, Windows, and Mac
Copilot in Excel: Unlocking insights from data
Copilot in Excel can help us format data, analyze data, and create visualizations. Read more here >
Example 1: Ask Copilot to format our data for better readability
Example 2: Ask Copilot a question about our data
Copilot in Excel: Expanded data structure support and comprehensive answers
Users are no longer limited to using Copilot in Excel only in Excel tables, because Copilot in Excel now works on data ranges resembling tables with a single row of headers on top. In addition, the edit box is now available on any Excel worksheet, regardless of the selected cell. Copilot will reason over the nearest table, or data range resembling a table, to the user’s selected grid area on the same worksheet. Read more here >
Excel for web
Modernized Excel grid (part 1 & 2)
Our latest update for web users brings you a host of powerful features designed to make your spreadsheet tasks simpler, faster, and more enjoyable. From effortless resizing and streamlined inserts to enhanced navigation and easy cell highlighting, discover how these modern tools can revolutionize your workflows. These features are currently rolling out to all Web users.
Read part one here >and part two here >
Sync Forms data to Excel
With just one click, you can now easily access all your form responses in Excel for the web and take advantage of Excel’s rich functions to analyze and visualize your data. With automatic syncing of new responses in real-time, you can keep working on your existing spreadsheet without missing a beat. This feature is now available to all Web users. Read more here >
Excel for Windows & Mac
Checkboxes in cells
Checkboxes have released to production in Excel for Windows and Mac. They are great for checklists, managing tasks and visualizing your data at a glance. With just a few clicks, you can insert Checkboxes into any cell, making your spreadsheets more dynamic and user-friendly. Read more here >
TRANSLATE & DETECTLANGUAGE functions (Insiders)
We are introducing two new functions designed to simplify and automate translations directly within your spreadsheet.
TRANSLATE() – a function that translates a text from one language to another.
DETECTLANGUAGE() – a function that detects the language of the specified text.
Excel for Windows
Python Editor (Insiders)
The Python Editor allows you to write and edit Python formulas in Excel using a dedicated code editor with similar capabilities as those available in Python notebook environments.
We are happy to share that we are making the editor available as an in-the-box option, and we have improved the appearance and usability of the Python Editor. You’ll see a slightly different user interface that stays faithful to the original design, and we have more to come! Read more here >
Python in Excel: additional library support (Insiders)
NLTK: Dive into natural language processing with the Natural Language Toolkit, perfect for text analytics and language-driven data insights. The following corpora are pre-loaded for use with Python in Excel: brown, punkt, stopwords, treebank, vader, and wordnet2022.
TheFuzz: Implement fuzzy matching to find approximate matches in your data, ideal for cleaning and preparing datasets.
Faker: Generate fake data.
WordCloud: Visualize word frequency in your data, making it easier to highlight key insights.
Squarify: Create treemaps to represent hierarchical data.
QRCode: Generate QR codes directly within Excel.
PlotNine: Create multi-layered plots that tell a story with your data.
Prince: Apply principal component analysis and other dimensionality reduction techniques to simplify complex datasets.
MLExtend: Extend your machine learning capabilities with additional tools for model evaluation, feature selection, and ensemble methods.
Excel for Mac
#FIA
Refresh data from Power Query’s From Folder connector (Insiders)
Power Query is a powerful and timesaving set of Excel tools that can help you get, shape, and refresh data quickly and easily. We’ve been continually adding functionality to Power Query in Excel for Mac over the last few years, such as the ability to import data from SQL Server databases.
Many of you have told us you’d also like the ability to refresh data from a folder source. We’ve heard you, and now you can! Read more here >
Check if a specific feature is in your version of Excel
Click here to open in a new browser tab
Your feedback helps shape the future of Excel. Please let us know how you like a particular feature and what we can improve upon—“Give a compliment” or “Make a suggestion”.. You can also submit new ideas or vote for other ideas via Microsoft Feedback.
Subscribe to our Excel Blog and the Insiders Blog to get the latest updates. Stay connected with us and other Excel fans around the world – join our Excel Community and follow us on X, formerly Twitter.
Special thanks to our Excel MVPs David Benaim, Bill Jelen, and Alan Murray for their contribution to this month’s What’s New in Excel article. David publishes weekly YouTube videos and regular LinkedIn posts about the latest innovations in Excel and more. Bill is the founder and host of MrExcel.com and the author of several books about Excel. Alan is an Excel trainer, author and speaker, best known for his blog Computergaga.com and YouTube channel with the same name.
Microsoft Tech Community – Latest Blogs –Read More
Why can’t I use the “Load Application” button in my deployed SLRT app to switch between MLDATX files to run on my Speedgoat target?
I have an App Designer app to interact with a Simulink Real-Time (SLRT) simulation running on my Speedgoat target. When running the app in MATLAB, I can switch between multiple MLDATX real-time application files to run on my Speedgoat using this dialog:
Then, I deployed this app to a standalone executable using MATLAB Compiler. However, when I try to click the "Load Application" button in the standalone app, either nothing happens (no dialog opens), or the following error occurs when attempting to load the MLDATX file:
Dot indexing into the result of a function call requires parentheses after the function name. The supported syntax is ‘sIrealtime().internal’.
Since R2024a:
Error communicating with target ‘xx.xx.xx.xx’: Specify the real-time application name in the ‘Application’ property of the Load Button component in the instrument panel app.
Then, I tried to implement a manual logic in my app using app.tg.load() that switches between MLDATX files of the same name located in different folders. This works when launching the app from MATLAB, but not when it’s deployed.I have an App Designer app to interact with a Simulink Real-Time (SLRT) simulation running on my Speedgoat target. When running the app in MATLAB, I can switch between multiple MLDATX real-time application files to run on my Speedgoat using this dialog:
Then, I deployed this app to a standalone executable using MATLAB Compiler. However, when I try to click the "Load Application" button in the standalone app, either nothing happens (no dialog opens), or the following error occurs when attempting to load the MLDATX file:
Dot indexing into the result of a function call requires parentheses after the function name. The supported syntax is ‘sIrealtime().internal’.
Since R2024a:
Error communicating with target ‘xx.xx.xx.xx’: Specify the real-time application name in the ‘Application’ property of the Load Button component in the instrument panel app.
Then, I tried to implement a manual logic in my app using app.tg.load() that switches between MLDATX files of the same name located in different folders. This works when launching the app from MATLAB, but not when it’s deployed. I have an App Designer app to interact with a Simulink Real-Time (SLRT) simulation running on my Speedgoat target. When running the app in MATLAB, I can switch between multiple MLDATX real-time application files to run on my Speedgoat using this dialog:
Then, I deployed this app to a standalone executable using MATLAB Compiler. However, when I try to click the "Load Application" button in the standalone app, either nothing happens (no dialog opens), or the following error occurs when attempting to load the MLDATX file:
Dot indexing into the result of a function call requires parentheses after the function name. The supported syntax is ‘sIrealtime().internal’.
Since R2024a:
Error communicating with target ‘xx.xx.xx.xx’: Specify the real-time application name in the ‘Application’ property of the Load Button component in the instrument panel app.
Then, I tried to implement a manual logic in my app using app.tg.load() that switches between MLDATX files of the same name located in different folders. This works when launching the app from MATLAB, but not when it’s deployed. slrt, app, loadbutton, load, application, slrtappgenerator MATLAB Answers — New Questions
How to Sort Matrix Rows from Highest to Lowest
Simplied my problem so it’s easier to solve. Let’s pretend I have MatrixA that has 2 columns, and I want to sort the rows from highest to lowest depending on the value of the cell in the second column. How would I do this?
I also have a VectorB that starts at 10 and would like to add the value of each row in column 2 of the sorted MatrixA. How would I do this? Note this needs to come after MatrixA is sorted from highest to lowest.
Any suggestions matlab wizards out there? Really want to avoid using loops to make the code inefficient.
%Just creating example of the matrix I want to sort you can ignore this
MatrixA = cell(3,2);
MatrixA{1,1} = "D1";
MatrixA{2,1} = "D2";
MatrixA{3,1} = "D3";
MatrixA{1,2} = 5;
MatrixA{2,2} = 15;
MatrixA{3,2} = 10;
% Creating Vector B based on the already defined values for MatrixA which aren’t in order
VectorA = [10 10+MatrixA{1,2} 10+MatrixA{2,2} 10+MatrixA{3,2}];
% How would I sort MatrixA from highest to lowest here and the values of VectorB to be based on the sorted MatrixA?Simplied my problem so it’s easier to solve. Let’s pretend I have MatrixA that has 2 columns, and I want to sort the rows from highest to lowest depending on the value of the cell in the second column. How would I do this?
I also have a VectorB that starts at 10 and would like to add the value of each row in column 2 of the sorted MatrixA. How would I do this? Note this needs to come after MatrixA is sorted from highest to lowest.
Any suggestions matlab wizards out there? Really want to avoid using loops to make the code inefficient.
%Just creating example of the matrix I want to sort you can ignore this
MatrixA = cell(3,2);
MatrixA{1,1} = "D1";
MatrixA{2,1} = "D2";
MatrixA{3,1} = "D3";
MatrixA{1,2} = 5;
MatrixA{2,2} = 15;
MatrixA{3,2} = 10;
% Creating Vector B based on the already defined values for MatrixA which aren’t in order
VectorA = [10 10+MatrixA{1,2} 10+MatrixA{2,2} 10+MatrixA{3,2}];
% How would I sort MatrixA from highest to lowest here and the values of VectorB to be based on the sorted MatrixA? Simplied my problem so it’s easier to solve. Let’s pretend I have MatrixA that has 2 columns, and I want to sort the rows from highest to lowest depending on the value of the cell in the second column. How would I do this?
I also have a VectorB that starts at 10 and would like to add the value of each row in column 2 of the sorted MatrixA. How would I do this? Note this needs to come after MatrixA is sorted from highest to lowest.
Any suggestions matlab wizards out there? Really want to avoid using loops to make the code inefficient.
%Just creating example of the matrix I want to sort you can ignore this
MatrixA = cell(3,2);
MatrixA{1,1} = "D1";
MatrixA{2,1} = "D2";
MatrixA{3,1} = "D3";
MatrixA{1,2} = 5;
MatrixA{2,2} = 15;
MatrixA{3,2} = 10;
% Creating Vector B based on the already defined values for MatrixA which aren’t in order
VectorA = [10 10+MatrixA{1,2} 10+MatrixA{2,2} 10+MatrixA{3,2}];
% How would I sort MatrixA from highest to lowest here and the values of VectorB to be based on the sorted MatrixA? matlab, matlab code, mathematics, matrix array, matrix, matrix manipulation, matrices, array, arrays, cell array, cell arrays, vector, vectors, vectorization, cell, excel, importing excel data, matlab function, matlab coder, struct, script, speed, solve, sort, filter, fsolve MATLAB Answers — New Questions
SharePoint List
Is there a way via Power Automate or another option that would email daily a list of items in a SharePoint List’s field that is missing results…like an approval name?
Is there a way via Power Automate or another option that would email daily a list of items in a SharePoint List’s field that is missing results…like an approval name? Read More
Allow items from this list to appear in search results?
I have Lists that need to be excluded from Search, and with each List’s Search Results setting turned off they are still being gathered by search queries and output to the search results. These lists appear at the top level under “Site Contents”, and I don’t see a way to get the Advanced Settings for a folder “/Lists”, in order to turn off the Search setting for that folder. E.g., the List name is “Gate Status List” and the web address given is “/Lists/Gate Status List/”. Any suggestions?
I have Lists that need to be excluded from Search, and with each List’s Search Results setting turned off they are still being gathered by search queries and output to the search results. These lists appear at the top level under “Site Contents”, and I don’t see a way to get the Advanced Settings for a folder “/Lists”, in order to turn off the Search setting for that folder. E.g., the List name is “Gate Status List” and the web address given is “/Lists/Gate Status List/”. Any suggestions? Read More
Azure teams bot – verify request source/content
Hi,
Before processing message by our application , we want to validate if the message is sent from MS teams and someone is not impersonating.
Does Teams Azure bot support any HMAC signature implementations? or something else that can ensure the request body hasn’t changed?
Like here:
Verifying HMAC from Microsoft Teams custom Bot in PHP
Verifying HMAC from Microsoft Teams bot in Python Flask
Thanks
Hi,Before processing message by our application , we want to validate if the message is sent from MS teams and someone is not impersonating. Does Teams Azure bot support any HMAC signature implementations? or something else that can ensure the request body hasn’t changed? Like here:Verifying HMAC from Microsoft Teams custom Bot in PHPVerifying HMAC from Microsoft Teams bot in Python Flask Thanks Read More
Defender for Android It doesn’t scan the files on the device, why?
Hi everyone,
I installed Defender for Android on my smartphone by connecting it to my personal Microsoft account but I noticed that it does not have file scanning like other competing antimalware.
Why does it offer limited protection without a fundamental feature like file scanning, what’s the point?
Thanks everyone.
Hi everyone,I installed Defender for Android on my smartphone by connecting it to my personal Microsoft account but I noticed that it does not have file scanning like other competing antimalware.Why does it offer limited protection without a fundamental feature like file scanning, what’s the point?Thanks everyone. Read More