Month: June 2024
Azure pricing: How to calculate costs of Azure products and services
In our previous blogs we explained the Azure pricing structure and how customers can estimate their project costs when migrating to Azure or building a cloud-native application. We introduced readers to Azure Migrate, the Total Cost of Ownership (TCO) Calculator, pay-as-you-go account, and the Azure Architecture Center.
Now we will go a step further to address the needs of a customer who has decided to migrate their workloads or deploy cloud-native solutions and wants to budget for the specific Azure services they’ll be using. We will continue using the example of our digital media company, Contoso, and how they use Azure services to feel confident they’re getting the best value at every stage of their cloud journey.
Discovering Azure pricing tools
With a clear picture of the solutions they want to migrate, the Azure services (like Azure OpenAI Service) to employ, and the involved costs, Contoso is ready to finalize their monthly budget. It is important for the digital media company to only pay for what they need, and they are able to maximize their cloud spending by leveraging Azure’s pricing tools and benefits.
First, the Azure pricing calculator allowed Contoso to calculate their monthly and hourly cost for each cloud service before deployment. This interactive tool tailored estimates based on the Azure services they plan to use, estimated usage quantities, and their region. They know, for example, that their OpenAI chatbot will be running E4v5 VMs on West U.S., 24 hours a day for at least 1 year, so they purchase Azure Reserved Virtual Machine Instances to save roughly 40% on their compute cost*.
They also knew that they will consistently be running a standard series 8 vCore provisioned compute size for Azure SQL Standard-series (Gen5) General Purpose in Sweden Central, so they purchased Azure Reservations to save roughly 35% compared to pay-as-you-go*. Reserving a set number of high-performance resources for a one-year term secures a substantial discount, allowing Contoso to allocate more budget towards developing innovative content creation tools, while ensuring their rendering pipeline remained stable and cost-effective.
Contoso also wanted to leverage their existing investment in Windows Server licenses with their Azure virtual machines. When deploying both the VMs and Azure SQL Database they took advantage of the Azure Hybrid Benefit to apply their existing Windows Server and SQL Server with Software Assurance to save on their Operating Service costs. This not only simplified the migration process, avoiding the need to purchase new licenses, but also significantly reduced the cost of running Windows-based workloads in the cloud.
Budget visibility while maximizing resources
By utilizing the Azure pricing calculator, Azure Reservations, and Azure Hybrid Benefit, Contoso gained the confidence to embrace the cloud resources they need while maintaining visibility into their budget. The potential for cost savings doesn’t end there, however. In our final blog we’ll look at how they can optimize their Azure workloads through additional pricing offers and architecture reviews.
*Example only. Actual savings may vary based on region, instance type, or usage.
Additional resources:
Azure Enablement Show: Understand Azure pricing & resources
Blog: Get the best value in your cloud journey with Azure pricing offers and resources
Blog: Azure pricing | How to navigate Azure pricing options and resources
Blog: Azure pricing | How to estimate Azure project costs
Blog: Azure pricing | How to optimize costs for your Azure workloads
Azure pricing skilling content collection
Estimate costs with the Azure pricing calculator – Microsoft Cost Management | Microsoft Learn
Microsoft Tech Community – Latest Blogs –Read More
Azure pricing: How to optimize costs for your Azure workloads
In our previous blogs we explained the Azure pricing structure, how customers can calculate their costs when migrating or building in Azure, and how they can budget for specific resources with the Azure pricing calculator, Azure Reservations, and Azure Hybrid Benefit.
In this final installment of our blog series, we will discover how to optimize the value of your Azure investment. Through a mixture of optimization best practices and Azure tools, we will see how the digital media company Contoso maximizes their cloud spend to get more out of their workloads.
Cost-effective tools and strategies to optimize Azure workloads
In the fast-paced world of digital media, efficiency and cost optimization are paramount. With workloads spanning from high-performance video rendering to real-time data analytics, Contoso wants to make sure they are managing costs and ensuring optimal resource utilization. Fortunately, Microsoft provides a suite of tools and best practices to help businesses streamline their Azure workloads and maximize their ROI (returns on investment).
Contoso starts by establishing a collaborative culture between their engineering, finance, and business teams, promoting data-driven decisions aligned with business objectives. This practice is called FinOps, an operational framework and cultural practice that brings together technology, processes, and people to maximize the value of cloud investments. Leveraging tools and services like Azure Policy, Azure Blueprints, Azure Automation, and Azure Resource Optimization to implement FinOps best practices helps Contoso optimize their cloud investments in the following ways:
Enforce consistent resource configurations
Enforce policies for accountability and efficiency
Automate operations
Continuously optimize resource utilization based on workload demands
To get deeper insight into their Azure spending, Contoso also relies on Microsoft Cost Management, our comprehensive solution which leverages the latest in Microsoft Copilot to bring you insights, accountability controls, and the ability to remediate when opportunities arise
The company utilizes Azure VMs for video rendering and transcoding tasks, often requiring high-performance compute resources which can result in significant costs if not managed effectively. With Microsoft Cost Management, the company can easily track and analyze the costs associated with these VMs, categorizing them by resource group, subscription, or custom tags.
By leveraging cost alerts and budgets, Contoso can proactively monitor their spending in Microsoft Cost Management and receive notifications when predefined thresholds are approached or exceeded. This empowers them to take timely actions, such as scaling down resources during periods of lower demand or implementing cost-saving measures like Azure Reservations for workloads with predictable usage patterns. The tool also provides detailed cost analysis reports, enabling the identification of potential cost optimization opportunities. For instance, the company may discover underutilized VMs or inefficient VM sizing, leading to right-sizing or scaling decisions that can significantly reduce costs without compromising performance.
For further streamlining of their workloads, Contoso looks to Azure Advisor. Acting as a personalized cloud consultant that proactively analyzes Azure resource configurations and usage patterns, Azure Advisor provides actionable recommendations to optimize performance, security, and cost-effectiveness.
For example, Contoso uses Azure SQL Database for storing and managing large volumes of media metadata and user data. Azure Advisor can analyze the database configuration and usage patterns, offering recommendations such as scaling the database to a higher or lower service tier based on actual workload demands. This not only ensures optimal performance but also helps prevent over-provisioning and unnecessary costs.
However, they also needed to accommodate dynamic workloads and a zero-downtime cutover to multiple data centers for uninterrupted usage. For this, Azure Advisor recommended Azure savings plans for compute. With savings plan they were able to commit to a consistent spend level based their historical usage and receive automatic savings on eligible compute usage. Azure savings plans provided the flexibility needed to handle Contoso’s dynamic traffic without incurring excessive costs.
Streamlining Azure workloads to maximize efficiency
In the dynamic and resource-intensive world of digital media, optimizing Azure workloads is crucial for maximizing efficiency and reducing operational costs. By leveraging Microsoft Cost Management, Azure Advisor, and FinOps best practices, Contoso gained valuable insights, actionable recommendations, and best practices to streamline their Azure deployments.
Additional resources:
Azure Enablement Show: Understand Azure pricing & resources
Blog: Azure pricing | How to navigate Azure pricing options and resources
Blog: Azure pricing | How to estimate Azure project costs
Blog: Azure pricing | How to calculate costs of Azure products and services
Azure pricing skilling content collection
Control Azure spending and manage bills with Microsoft Cost Management + Billing – Training
Microsoft Tech Community – Latest Blogs –Read More
Microsoft Build 2024 with MVP Communities
Microsoft Build took place May 21 to 23, 2024, bringing the latest AI innovations to technology users worldwide. This year’s Microsoft Build showcased a variety of updates focusing on Microsoft AI and Copilot, with the announcement of Copilot+ PC just before the event, offering attendees a firsthand look at new developments from solutions to devices in the AI era.
Like last year, Microsoft Build 2024 was a hybrid event, welcoming numerous Microsoft MVPs and Regional Directors (RDs) from around the globe in person and virtually. In this blog post, we highlight some unique experiences and contributions of MVPs and RDs at the Seattle event venue.
Exclusive Program Experiences
To enhance the conference experience for our global community leaders, we offered several special engagement opportunities. Here are a few examples:
MVP Connect at Microsoft Build: We hosted MVP Connect, a special event for MVPs and RDs visiting Seattle. This gathering allowed 55 MVPs and RDs to meet in person, share updates on the MVP/RD program, learn about the latest Microsoft products and services, and engage in sessions led by fellow MVPs. This provided a unique opportunity for community leaders and program members to connect and interact in person.
Special Seats at Keynote: For an exclusive event experience, special seats were reserved for MVPs and RDs at the keynotes of Microsoft Build. It allowed attendees to bypass the general attendee line and see executive speakers close-up.
MVP/RD Participant Engagements
To bring MVP/RD expertise to a wider audience, we collaborated with them in various initiatives that helped shape Microsoft Build.
Expert Meetup: Throughout the three-day event, nearly 70 MVPs and RDs interacted with attendees as experts. These discussions, based on seven core topics and MVP/RD technical knowledge, provided valuable advice for participants on future technology utilization, supporting attendees’ event experience.
MVP-Delivered Demo Sessions: Nearly 20 MVPs and RDs conducted demo sessions covering topics including AI, Copilot, Power Platform, GitHub, and more. These sessions captivated participants, offering a fresh, community leader’s perspective on utilizing these products and services.
Instructor-led Lab Proctoring: To support participants’ learning, 12 MVPs and RDs served as proctors in instructor-led lab sessions. Many MVPs assisted in multiple labs, helping numerous participants gain hands-on experience with new technologies.
MVP Insights: 14 MVPs and RDs joined interviews with Microsoft Build hosts on the main stage in the Hub. These interviews were broadcast to the virtual audience during interstitial segments and highlighted the Microsoft Build announcements MVP and RD interviewees were most excited about.
The various activities featured above provided MVPs and RDs with more than just a typical conference experience. They not only learned about the latest technologies but also inspired participants by sharing their unique insights. We thank all participants and contributors for making these initiatives a success!
Following the excitement of new announcements at Microsoft Build, MVPs and RDs have been organizing community events to share their learnings. Those interested in learning from community leaders about the latest technologies can join various MVP/RD-led community events. Here is an example of an event information platform where you can find these events, MVP Communities Event Search: https://aka.ms/mvp/upcomingevents
For those looking to further enhance their AI skills, the Microsoft Learn Challenge: Build Edition is currently underway. This challenge runs until Friday June 21 and offers five learning opportunities to dive deeper into Azure AI, Microsoft Fabric, GitHub Copilot, Copilot for Microsoft 365, and Microsoft Copilot Studio. Join any challenge that interests you to expand your skills.
To learn more about Microsoft Build, please visit the following websites.
Microsoft Build (Official website)
Microsoft Build 2024 Book of News (Announcements)
Build on Microsoft Learn (Microsoft Learn)
Microsoft Learn Challenge: Build Edition (Microsoft Learn)
The challenges end on June 21, 2024, at 4:00 PM UTC
Microsoft Build 2024 (Playlist on Microsoft Developer YouTube)
Microsoft Tech Community – Latest Blogs –Read More
Create array of customAntennaStl with multiple feeding points
Hi,
I am new to Matlab.
I want to create an array of antennas from a STL model I have made.
So far my code looks like this:
antenna = customAntennaStl(FileName=…*insert filepath*);
antenna.createFeed([0.55 0.635 0],1);
% Reduce the mesh size for faster calculations
mesh(antenna, MaxEdgeLength = 0.05);
figure
show(antenna)
I have tried unsuccessfully to create an array out of this single element. All the methods I found only work for predesigned antennas.
Ideally I want to create a square array of such antennas that would look like the photo attached, with multiple feeding points, since the antennas are not attached.
Please note that I am not attached to using a customAntennaStl, I would be interested in any other method, as long as I can roughly keep the shape of the antenna. The antenna can also be flattened to two dimensions .
——–
For completeness in the simulation I want to do, antennas facing each other are driven with opposite phases at a certain frequency. The two pairs of antennas are driven in quadrature.
Necessary files are attached.Hi,
I am new to Matlab.
I want to create an array of antennas from a STL model I have made.
So far my code looks like this:
antenna = customAntennaStl(FileName=…*insert filepath*);
antenna.createFeed([0.55 0.635 0],1);
% Reduce the mesh size for faster calculations
mesh(antenna, MaxEdgeLength = 0.05);
figure
show(antenna)
I have tried unsuccessfully to create an array out of this single element. All the methods I found only work for predesigned antennas.
Ideally I want to create a square array of such antennas that would look like the photo attached, with multiple feeding points, since the antennas are not attached.
Please note that I am not attached to using a customAntennaStl, I would be interested in any other method, as long as I can roughly keep the shape of the antenna. The antenna can also be flattened to two dimensions .
——–
For completeness in the simulation I want to do, antennas facing each other are driven with opposite phases at a certain frequency. The two pairs of antennas are driven in quadrature.
Necessary files are attached. Hi,
I am new to Matlab.
I want to create an array of antennas from a STL model I have made.
So far my code looks like this:
antenna = customAntennaStl(FileName=…*insert filepath*);
antenna.createFeed([0.55 0.635 0],1);
% Reduce the mesh size for faster calculations
mesh(antenna, MaxEdgeLength = 0.05);
figure
show(antenna)
I have tried unsuccessfully to create an array out of this single element. All the methods I found only work for predesigned antennas.
Ideally I want to create a square array of such antennas that would look like the photo attached, with multiple feeding points, since the antennas are not attached.
Please note that I am not attached to using a customAntennaStl, I would be interested in any other method, as long as I can roughly keep the shape of the antenna. The antenna can also be flattened to two dimensions .
——–
For completeness in the simulation I want to do, antennas facing each other are driven with opposite phases at a certain frequency. The two pairs of antennas are driven in quadrature.
Necessary files are attached. antenna, array, custom MATLAB Answers — New Questions
Why am I getting the error “api-ms-win-crt-runtime-l1-1-0.dll is missing” or “std::out_of_range std::exception::what: unregistered feature: webui” when running the MathWorks Product installer or MATLAB?
Why am I getting the error "api-ms-win-crt-runtime-l1-1-0.dll is missing" or "std::out_of_range std::exception::what: unregistered feature: webui" when running the MathWorks Product installer or MATLAB?Why am I getting the error "api-ms-win-crt-runtime-l1-1-0.dll is missing" or "std::out_of_range std::exception::what: unregistered feature: webui" when running the MathWorks Product installer or MATLAB? Why am I getting the error "api-ms-win-crt-runtime-l1-1-0.dll is missing" or "std::out_of_range std::exception::what: unregistered feature: webui" when running the MathWorks Product installer or MATLAB? MATLAB Answers — New Questions
Pcolor with two x axes and two y axes
I have some data Z (say MxN) matrix which i visualize with pcolor(X,Y,Z). I’d like the plot to display:
1) The colorbar;
2) Left and right yaxes with different scales
3) Top and bottom xaxes (or two xaxes on the bottom), one giving X in some units, the other its inverse (2*pi/X)
I have not found (by myself) any snippet on the community forum implementing all of these simultaneously, but it would help me tremendously.I have some data Z (say MxN) matrix which i visualize with pcolor(X,Y,Z). I’d like the plot to display:
1) The colorbar;
2) Left and right yaxes with different scales
3) Top and bottom xaxes (or two xaxes on the bottom), one giving X in some units, the other its inverse (2*pi/X)
I have not found (by myself) any snippet on the community forum implementing all of these simultaneously, but it would help me tremendously. I have some data Z (say MxN) matrix which i visualize with pcolor(X,Y,Z). I’d like the plot to display:
1) The colorbar;
2) Left and right yaxes with different scales
3) Top and bottom xaxes (or two xaxes on the bottom), one giving X in some units, the other its inverse (2*pi/X)
I have not found (by myself) any snippet on the community forum implementing all of these simultaneously, but it would help me tremendously. plotting, contour MATLAB Answers — New Questions
When I run this code in Matlab, it pops up “Function or variable ‘six_bar’ is not recognized”. How to solve the error?
clear;
i1=0.1;
i3=0.59;
i4=0.159;
i6=0.36;
i61=0.578;
omega1=0.87;
alpha=0;
hd=pi/180;
du=180/pi;
%调用子函数,six_bar返回牛头刨床的位移,角速度,角加速度
for n1 = 1:459
theta1(n1)=-2*pi+5.8119+(n1-1)*hd;
ii=[i1,i3,i4,i6,i61];
[theta,omega,alpha]=six_bar(theta1(n1),omega1,ii);
s3(n1)=theta(1);
theta3(n1)=theta(2);
theta4(n1)=theta(3);
sE(n1)=theta(4);
v2(n1)=omega(1);
omega3(n1)=omega(2);
omega4(n1)=omega(3);
vE(n1)=omega(4);
a2(n1)=alpha(1);
alpha3(n1)=alpha(2);
alpha4(n1)=alpha(3);
aE(n1)=alpha(4);
end
%3.位移,角速度,角加速度和牛头刨床图形输出
figure(1);
n1=1:459;
t=(n1-1)*2*pi/360;
subplot(2,2,1);%绘角位移及位移线图
plot(t,theta3*du,’r-.’); %’r-.’表示线条是红色的,并且线型是点画线
grid on;
hold on;
title(‘角位移及位移线图’)
axis auto;
[haxes,~,~]=plotyy(t,theta4*du,t,sE); %
grid on;
hold on;
xlabel(‘时间/s’);
axes(haxes(1));%haxes(1)表示左边的坐标轴的句柄,这行代码表示下面的代码是在左边的坐标轴上作图,修改
ylabel(‘角位移/circ’);
axes(haxes(2));
ylabel(‘位移/m’);
hold on;
grid on;
text(1.15,-0.65,’theta_3′);
text(3.4,0.27,’theta_4′);
text(2.25,-0.15,’s_E’);
subplot(2,2,2); %绘角速度及速度线图
plot(t,omega3,’r-.’); %’r-.’表示线条是红色的,并且线型是点画线
grid on;
hold on;
title(‘角速度及速度线图’)
axis auto;
[haxes,~,~]=plotyy(t,omega4,t,vE); %
grid on;
hold on;
xlabel(‘时间/s’);
axes(haxes(1));%haxes(1)表示左边的坐标轴的句柄,这行代码表示下面的代码是在左边的坐标轴上作图,修改
ylabel(‘角速度/radcdots∧{-1}’);
axes(haxes(2));
ylabel(‘速度/mcdots∧{-1}’);
hold on;
grid on;
text(3.1,0.35,’omega_3′);
text(2.1,0.1,’omega_4′);
text(5.5,0.45,’v_E’);
subplot(2,2,3); %绘角加速度及加速度线图
plot(t,alpha3,’r-.’); %’r-.’表示线条是红色的,并且线型是点画线
grid on;
hold on;
title(‘角加速度及加速度线图’)
axis auto;
[haxes,~,~]=plotyy(t,alpha4,t,aE); %
grid on;
hold on;
xlabel(‘时间’);
axes(haxes(1));%haxes(1)表示左边的坐标轴的句柄,这行代码表示下面的代码是在左边的坐标轴上作图,修改
ylabel(‘角加速度/radcdots∧{-2}’);
axes(haxes(2));
ylabel(‘加速度/mcdots∧{-2}’);
hold on;
grid on;
text(1.5,0.3,’alpha_3′);
text(3.5,0.51,’alpha_4′);
text(1.5,-0.11,’a_E’);
subplot(2,2,4); %牛头刨床机构
n1=20;
x(1)=0;y(1)=0;
x(2)=(s3(n1)*1000-50)*cos(theta3(n1));
y(2)=(s3(n1)*1000-50)*sin(theta3(n1));
x(3)=0;y(3)=i6*1000;
x(4)=i1*1000*cos(theta1(n1));
y(4)=s3(n1)*1000*sin(theta3(n1));
x(5)=(s3(n1)*1000+50)*cos(theta3(n1));
y(5)=(s3(n1)*1000+50)*sin(theta3(n1));
x(6)=i3*1000*cos(theta3(n1));
y(6)=i3*1000*sin(theta3(n1));
x(7)=i3*1000*cos(theta3(n1))+i4*1000*cos(theta4(n1));
y(7)=i3*1000*sin(theta3(n1))+i4*1000*sin(theta4(n1));
x(8)=i3*1000*cos(theta3(n1))+i4*1000*cos(theta4(n1))-900;
y(8)=i61*1000;
x(9)=i3*1000*cos(theta3(n1))+i4*1000*cos(theta4(n1))+600;
y(9)=i61*1000;
x(10)=(s3(n1)*1000-50)*cos(theta3(n1));
y(10)=(s3(n1)*1000-50)*sin(theta3(n1));
x(11)=x(10)+25*cos(pi/2-theta3(n1));
y(11)=y(10)-25*sin(pi/2-theta3(n1));
x(12)=x(11)+100*cos(theta3(n1));
y(12)=y(11)+100*sin(theta3(n1));
x(13)=x(12)-50*cos(pi/2-theta3(n1));
y(13)=y(12)+50*sin(pi/2-theta3(n1));
x(14)=x(10)-25*cos(pi/2-theta3(n1));
y(14)=y(10)+25*sin(pi/2-theta3(n1));
x(15)=x(10);
y(15)=y(10);
x(16)=0;
y(16)=0;
x(17)=0;
y(17)=i6*1000;
k=1:2;
plot(x(k),y(k));
hold on;
k=3:4;
plot(x(k),y(k));
hold on;
k=5:9;
plot(x(k),y(k));
hold on;
k=10:15;
plot(x(k),y(k));
hold on;
k=16:17;
plot(x(k),y(k));
hold on;
grid on;
axis ([-500 600 0 650]);
title(‘牛头刨床’);
grid on;
xlabel(‘mm’);
ylabel(‘mm’);
plot(x(1),y(1),’o’);
plot(x(3),y(3),’o’);
plot(x(4),y(4),’o’);
plot(x(6),y(6),’o’);
plot(x(7),y(7),’o’);
hold on;
grid on;
xlabel(‘mm’);
ylabel(‘mm’);
axis([-400 600 0 650]);
function [theta, omega, alpha]=six_bar(theta1,omega1,ii)
i1=ii(1);
i3=ii(2);
i4=ii(3);
i6=ii(4);
i61=ii(5);
%1.计算角位移和线位移
s3 =sqrt((i1*cos(theta1))*(i1*cos(theta1))+(i6+i1*sin(theta1))*(i6+i1*sin(theta1)));
%s3表示滑块2相对于CD杆的位移
theta3 =acos((i1*cos(theta1 ))/s3 );
%theta3表示杆3转过角度
theta4 =pi-asin((i61-i3*sin(theta3 ))/i4);
%theta4表示杆4转过角度
sE =i3*cos(theta3 )+i4*cos(theta4 );
%sE表示杆5的位移
theta(1)=s3;
theta(2)=theta3;
theta(3)=theta4;
theta(4)=sE;
%2.计算角速度和线速度
A=[sin(theta3 ),s3 *cos(theta3 ),0,0;
-cos(theta3 ),s3 *sin(theta3 ),0,0;
0,i3*sin(theta3 ),i4*sin(theta4 ),1;
0,i3*cos(theta3 ),i4*cos(theta4 ),0];
B=[i1*cos(theta1 );i1*sin(theta1 );0;0];
omega=A(omega1*B);
v2 =omega(1);
%滑块2的速度
omega3 =omega(2);
%构件3的角速度
omega4 =omega(3);
%构件4的角速度
vE =omega(4);
%构件5的速度
%3.计算角加速度和加速度
A=[sin(theta3 ),s3 *cos(theta3 ),0,0;
%从动件位置参数矩阵
cos(theta3 ),-s3 *sin(theta3 ),0,0;
0,i3*sin(theta3 ),i4*sin(theta4 ),1;
0,i3*cos(theta3 ),i4*cos(theta4 ),0];
At=[omega3 *cos(theta3 ),(v2 *cos(theta3 )-s3*omega3 *sin(theta3 )),0,0;
-omega3 *sin(theta3 ),(-v2 *sin(theta3 )-s3 *omega3 *cos(theta3 )),0,0;
0,i3*omega3 *cos(theta3 ),i4*omega4 *cos(theta4 ),0;
0,-i3*omega3 *sin(theta3 ),-i4*omega4 *sin(theta4 ),0];
Bt=[-i1*omega1*sin(theta1 );-i1*omega1*cos(theta1 );0;0];
alpha=A(-At*omega+omega1*Bt);
%机构从动件的加速度列阵
a2 =alpha(1);
%a2表示滑块2的加速度
alpha3 =alpha(2);
%alpha3表示杆3的角加速度
alpha4 =alpha(3);
%alpha4表示杆4的角加速度
aE =alpha(4);
%构件5的加速度
endclear;
i1=0.1;
i3=0.59;
i4=0.159;
i6=0.36;
i61=0.578;
omega1=0.87;
alpha=0;
hd=pi/180;
du=180/pi;
%调用子函数,six_bar返回牛头刨床的位移,角速度,角加速度
for n1 = 1:459
theta1(n1)=-2*pi+5.8119+(n1-1)*hd;
ii=[i1,i3,i4,i6,i61];
[theta,omega,alpha]=six_bar(theta1(n1),omega1,ii);
s3(n1)=theta(1);
theta3(n1)=theta(2);
theta4(n1)=theta(3);
sE(n1)=theta(4);
v2(n1)=omega(1);
omega3(n1)=omega(2);
omega4(n1)=omega(3);
vE(n1)=omega(4);
a2(n1)=alpha(1);
alpha3(n1)=alpha(2);
alpha4(n1)=alpha(3);
aE(n1)=alpha(4);
end
%3.位移,角速度,角加速度和牛头刨床图形输出
figure(1);
n1=1:459;
t=(n1-1)*2*pi/360;
subplot(2,2,1);%绘角位移及位移线图
plot(t,theta3*du,’r-.’); %’r-.’表示线条是红色的,并且线型是点画线
grid on;
hold on;
title(‘角位移及位移线图’)
axis auto;
[haxes,~,~]=plotyy(t,theta4*du,t,sE); %
grid on;
hold on;
xlabel(‘时间/s’);
axes(haxes(1));%haxes(1)表示左边的坐标轴的句柄,这行代码表示下面的代码是在左边的坐标轴上作图,修改
ylabel(‘角位移/circ’);
axes(haxes(2));
ylabel(‘位移/m’);
hold on;
grid on;
text(1.15,-0.65,’theta_3′);
text(3.4,0.27,’theta_4′);
text(2.25,-0.15,’s_E’);
subplot(2,2,2); %绘角速度及速度线图
plot(t,omega3,’r-.’); %’r-.’表示线条是红色的,并且线型是点画线
grid on;
hold on;
title(‘角速度及速度线图’)
axis auto;
[haxes,~,~]=plotyy(t,omega4,t,vE); %
grid on;
hold on;
xlabel(‘时间/s’);
axes(haxes(1));%haxes(1)表示左边的坐标轴的句柄,这行代码表示下面的代码是在左边的坐标轴上作图,修改
ylabel(‘角速度/radcdots∧{-1}’);
axes(haxes(2));
ylabel(‘速度/mcdots∧{-1}’);
hold on;
grid on;
text(3.1,0.35,’omega_3′);
text(2.1,0.1,’omega_4′);
text(5.5,0.45,’v_E’);
subplot(2,2,3); %绘角加速度及加速度线图
plot(t,alpha3,’r-.’); %’r-.’表示线条是红色的,并且线型是点画线
grid on;
hold on;
title(‘角加速度及加速度线图’)
axis auto;
[haxes,~,~]=plotyy(t,alpha4,t,aE); %
grid on;
hold on;
xlabel(‘时间’);
axes(haxes(1));%haxes(1)表示左边的坐标轴的句柄,这行代码表示下面的代码是在左边的坐标轴上作图,修改
ylabel(‘角加速度/radcdots∧{-2}’);
axes(haxes(2));
ylabel(‘加速度/mcdots∧{-2}’);
hold on;
grid on;
text(1.5,0.3,’alpha_3′);
text(3.5,0.51,’alpha_4′);
text(1.5,-0.11,’a_E’);
subplot(2,2,4); %牛头刨床机构
n1=20;
x(1)=0;y(1)=0;
x(2)=(s3(n1)*1000-50)*cos(theta3(n1));
y(2)=(s3(n1)*1000-50)*sin(theta3(n1));
x(3)=0;y(3)=i6*1000;
x(4)=i1*1000*cos(theta1(n1));
y(4)=s3(n1)*1000*sin(theta3(n1));
x(5)=(s3(n1)*1000+50)*cos(theta3(n1));
y(5)=(s3(n1)*1000+50)*sin(theta3(n1));
x(6)=i3*1000*cos(theta3(n1));
y(6)=i3*1000*sin(theta3(n1));
x(7)=i3*1000*cos(theta3(n1))+i4*1000*cos(theta4(n1));
y(7)=i3*1000*sin(theta3(n1))+i4*1000*sin(theta4(n1));
x(8)=i3*1000*cos(theta3(n1))+i4*1000*cos(theta4(n1))-900;
y(8)=i61*1000;
x(9)=i3*1000*cos(theta3(n1))+i4*1000*cos(theta4(n1))+600;
y(9)=i61*1000;
x(10)=(s3(n1)*1000-50)*cos(theta3(n1));
y(10)=(s3(n1)*1000-50)*sin(theta3(n1));
x(11)=x(10)+25*cos(pi/2-theta3(n1));
y(11)=y(10)-25*sin(pi/2-theta3(n1));
x(12)=x(11)+100*cos(theta3(n1));
y(12)=y(11)+100*sin(theta3(n1));
x(13)=x(12)-50*cos(pi/2-theta3(n1));
y(13)=y(12)+50*sin(pi/2-theta3(n1));
x(14)=x(10)-25*cos(pi/2-theta3(n1));
y(14)=y(10)+25*sin(pi/2-theta3(n1));
x(15)=x(10);
y(15)=y(10);
x(16)=0;
y(16)=0;
x(17)=0;
y(17)=i6*1000;
k=1:2;
plot(x(k),y(k));
hold on;
k=3:4;
plot(x(k),y(k));
hold on;
k=5:9;
plot(x(k),y(k));
hold on;
k=10:15;
plot(x(k),y(k));
hold on;
k=16:17;
plot(x(k),y(k));
hold on;
grid on;
axis ([-500 600 0 650]);
title(‘牛头刨床’);
grid on;
xlabel(‘mm’);
ylabel(‘mm’);
plot(x(1),y(1),’o’);
plot(x(3),y(3),’o’);
plot(x(4),y(4),’o’);
plot(x(6),y(6),’o’);
plot(x(7),y(7),’o’);
hold on;
grid on;
xlabel(‘mm’);
ylabel(‘mm’);
axis([-400 600 0 650]);
function [theta, omega, alpha]=six_bar(theta1,omega1,ii)
i1=ii(1);
i3=ii(2);
i4=ii(3);
i6=ii(4);
i61=ii(5);
%1.计算角位移和线位移
s3 =sqrt((i1*cos(theta1))*(i1*cos(theta1))+(i6+i1*sin(theta1))*(i6+i1*sin(theta1)));
%s3表示滑块2相对于CD杆的位移
theta3 =acos((i1*cos(theta1 ))/s3 );
%theta3表示杆3转过角度
theta4 =pi-asin((i61-i3*sin(theta3 ))/i4);
%theta4表示杆4转过角度
sE =i3*cos(theta3 )+i4*cos(theta4 );
%sE表示杆5的位移
theta(1)=s3;
theta(2)=theta3;
theta(3)=theta4;
theta(4)=sE;
%2.计算角速度和线速度
A=[sin(theta3 ),s3 *cos(theta3 ),0,0;
-cos(theta3 ),s3 *sin(theta3 ),0,0;
0,i3*sin(theta3 ),i4*sin(theta4 ),1;
0,i3*cos(theta3 ),i4*cos(theta4 ),0];
B=[i1*cos(theta1 );i1*sin(theta1 );0;0];
omega=A(omega1*B);
v2 =omega(1);
%滑块2的速度
omega3 =omega(2);
%构件3的角速度
omega4 =omega(3);
%构件4的角速度
vE =omega(4);
%构件5的速度
%3.计算角加速度和加速度
A=[sin(theta3 ),s3 *cos(theta3 ),0,0;
%从动件位置参数矩阵
cos(theta3 ),-s3 *sin(theta3 ),0,0;
0,i3*sin(theta3 ),i4*sin(theta4 ),1;
0,i3*cos(theta3 ),i4*cos(theta4 ),0];
At=[omega3 *cos(theta3 ),(v2 *cos(theta3 )-s3*omega3 *sin(theta3 )),0,0;
-omega3 *sin(theta3 ),(-v2 *sin(theta3 )-s3 *omega3 *cos(theta3 )),0,0;
0,i3*omega3 *cos(theta3 ),i4*omega4 *cos(theta4 ),0;
0,-i3*omega3 *sin(theta3 ),-i4*omega4 *sin(theta4 ),0];
Bt=[-i1*omega1*sin(theta1 );-i1*omega1*cos(theta1 );0;0];
alpha=A(-At*omega+omega1*Bt);
%机构从动件的加速度列阵
a2 =alpha(1);
%a2表示滑块2的加速度
alpha3 =alpha(2);
%alpha3表示杆3的角加速度
alpha4 =alpha(3);
%alpha4表示杆4的角加速度
aE =alpha(4);
%构件5的加速度
end clear;
i1=0.1;
i3=0.59;
i4=0.159;
i6=0.36;
i61=0.578;
omega1=0.87;
alpha=0;
hd=pi/180;
du=180/pi;
%调用子函数,six_bar返回牛头刨床的位移,角速度,角加速度
for n1 = 1:459
theta1(n1)=-2*pi+5.8119+(n1-1)*hd;
ii=[i1,i3,i4,i6,i61];
[theta,omega,alpha]=six_bar(theta1(n1),omega1,ii);
s3(n1)=theta(1);
theta3(n1)=theta(2);
theta4(n1)=theta(3);
sE(n1)=theta(4);
v2(n1)=omega(1);
omega3(n1)=omega(2);
omega4(n1)=omega(3);
vE(n1)=omega(4);
a2(n1)=alpha(1);
alpha3(n1)=alpha(2);
alpha4(n1)=alpha(3);
aE(n1)=alpha(4);
end
%3.位移,角速度,角加速度和牛头刨床图形输出
figure(1);
n1=1:459;
t=(n1-1)*2*pi/360;
subplot(2,2,1);%绘角位移及位移线图
plot(t,theta3*du,’r-.’); %’r-.’表示线条是红色的,并且线型是点画线
grid on;
hold on;
title(‘角位移及位移线图’)
axis auto;
[haxes,~,~]=plotyy(t,theta4*du,t,sE); %
grid on;
hold on;
xlabel(‘时间/s’);
axes(haxes(1));%haxes(1)表示左边的坐标轴的句柄,这行代码表示下面的代码是在左边的坐标轴上作图,修改
ylabel(‘角位移/circ’);
axes(haxes(2));
ylabel(‘位移/m’);
hold on;
grid on;
text(1.15,-0.65,’theta_3′);
text(3.4,0.27,’theta_4′);
text(2.25,-0.15,’s_E’);
subplot(2,2,2); %绘角速度及速度线图
plot(t,omega3,’r-.’); %’r-.’表示线条是红色的,并且线型是点画线
grid on;
hold on;
title(‘角速度及速度线图’)
axis auto;
[haxes,~,~]=plotyy(t,omega4,t,vE); %
grid on;
hold on;
xlabel(‘时间/s’);
axes(haxes(1));%haxes(1)表示左边的坐标轴的句柄,这行代码表示下面的代码是在左边的坐标轴上作图,修改
ylabel(‘角速度/radcdots∧{-1}’);
axes(haxes(2));
ylabel(‘速度/mcdots∧{-1}’);
hold on;
grid on;
text(3.1,0.35,’omega_3′);
text(2.1,0.1,’omega_4′);
text(5.5,0.45,’v_E’);
subplot(2,2,3); %绘角加速度及加速度线图
plot(t,alpha3,’r-.’); %’r-.’表示线条是红色的,并且线型是点画线
grid on;
hold on;
title(‘角加速度及加速度线图’)
axis auto;
[haxes,~,~]=plotyy(t,alpha4,t,aE); %
grid on;
hold on;
xlabel(‘时间’);
axes(haxes(1));%haxes(1)表示左边的坐标轴的句柄,这行代码表示下面的代码是在左边的坐标轴上作图,修改
ylabel(‘角加速度/radcdots∧{-2}’);
axes(haxes(2));
ylabel(‘加速度/mcdots∧{-2}’);
hold on;
grid on;
text(1.5,0.3,’alpha_3′);
text(3.5,0.51,’alpha_4′);
text(1.5,-0.11,’a_E’);
subplot(2,2,4); %牛头刨床机构
n1=20;
x(1)=0;y(1)=0;
x(2)=(s3(n1)*1000-50)*cos(theta3(n1));
y(2)=(s3(n1)*1000-50)*sin(theta3(n1));
x(3)=0;y(3)=i6*1000;
x(4)=i1*1000*cos(theta1(n1));
y(4)=s3(n1)*1000*sin(theta3(n1));
x(5)=(s3(n1)*1000+50)*cos(theta3(n1));
y(5)=(s3(n1)*1000+50)*sin(theta3(n1));
x(6)=i3*1000*cos(theta3(n1));
y(6)=i3*1000*sin(theta3(n1));
x(7)=i3*1000*cos(theta3(n1))+i4*1000*cos(theta4(n1));
y(7)=i3*1000*sin(theta3(n1))+i4*1000*sin(theta4(n1));
x(8)=i3*1000*cos(theta3(n1))+i4*1000*cos(theta4(n1))-900;
y(8)=i61*1000;
x(9)=i3*1000*cos(theta3(n1))+i4*1000*cos(theta4(n1))+600;
y(9)=i61*1000;
x(10)=(s3(n1)*1000-50)*cos(theta3(n1));
y(10)=(s3(n1)*1000-50)*sin(theta3(n1));
x(11)=x(10)+25*cos(pi/2-theta3(n1));
y(11)=y(10)-25*sin(pi/2-theta3(n1));
x(12)=x(11)+100*cos(theta3(n1));
y(12)=y(11)+100*sin(theta3(n1));
x(13)=x(12)-50*cos(pi/2-theta3(n1));
y(13)=y(12)+50*sin(pi/2-theta3(n1));
x(14)=x(10)-25*cos(pi/2-theta3(n1));
y(14)=y(10)+25*sin(pi/2-theta3(n1));
x(15)=x(10);
y(15)=y(10);
x(16)=0;
y(16)=0;
x(17)=0;
y(17)=i6*1000;
k=1:2;
plot(x(k),y(k));
hold on;
k=3:4;
plot(x(k),y(k));
hold on;
k=5:9;
plot(x(k),y(k));
hold on;
k=10:15;
plot(x(k),y(k));
hold on;
k=16:17;
plot(x(k),y(k));
hold on;
grid on;
axis ([-500 600 0 650]);
title(‘牛头刨床’);
grid on;
xlabel(‘mm’);
ylabel(‘mm’);
plot(x(1),y(1),’o’);
plot(x(3),y(3),’o’);
plot(x(4),y(4),’o’);
plot(x(6),y(6),’o’);
plot(x(7),y(7),’o’);
hold on;
grid on;
xlabel(‘mm’);
ylabel(‘mm’);
axis([-400 600 0 650]);
function [theta, omega, alpha]=six_bar(theta1,omega1,ii)
i1=ii(1);
i3=ii(2);
i4=ii(3);
i6=ii(4);
i61=ii(5);
%1.计算角位移和线位移
s3 =sqrt((i1*cos(theta1))*(i1*cos(theta1))+(i6+i1*sin(theta1))*(i6+i1*sin(theta1)));
%s3表示滑块2相对于CD杆的位移
theta3 =acos((i1*cos(theta1 ))/s3 );
%theta3表示杆3转过角度
theta4 =pi-asin((i61-i3*sin(theta3 ))/i4);
%theta4表示杆4转过角度
sE =i3*cos(theta3 )+i4*cos(theta4 );
%sE表示杆5的位移
theta(1)=s3;
theta(2)=theta3;
theta(3)=theta4;
theta(4)=sE;
%2.计算角速度和线速度
A=[sin(theta3 ),s3 *cos(theta3 ),0,0;
-cos(theta3 ),s3 *sin(theta3 ),0,0;
0,i3*sin(theta3 ),i4*sin(theta4 ),1;
0,i3*cos(theta3 ),i4*cos(theta4 ),0];
B=[i1*cos(theta1 );i1*sin(theta1 );0;0];
omega=A(omega1*B);
v2 =omega(1);
%滑块2的速度
omega3 =omega(2);
%构件3的角速度
omega4 =omega(3);
%构件4的角速度
vE =omega(4);
%构件5的速度
%3.计算角加速度和加速度
A=[sin(theta3 ),s3 *cos(theta3 ),0,0;
%从动件位置参数矩阵
cos(theta3 ),-s3 *sin(theta3 ),0,0;
0,i3*sin(theta3 ),i4*sin(theta4 ),1;
0,i3*cos(theta3 ),i4*cos(theta4 ),0];
At=[omega3 *cos(theta3 ),(v2 *cos(theta3 )-s3*omega3 *sin(theta3 )),0,0;
-omega3 *sin(theta3 ),(-v2 *sin(theta3 )-s3 *omega3 *cos(theta3 )),0,0;
0,i3*omega3 *cos(theta3 ),i4*omega4 *cos(theta4 ),0;
0,-i3*omega3 *sin(theta3 ),-i4*omega4 *sin(theta4 ),0];
Bt=[-i1*omega1*sin(theta1 );-i1*omega1*cos(theta1 );0;0];
alpha=A(-At*omega+omega1*Bt);
%机构从动件的加速度列阵
a2 =alpha(1);
%a2表示滑块2的加速度
alpha3 =alpha(2);
%alpha3表示杆3的角加速度
alpha4 =alpha(3);
%alpha4表示杆4的角加速度
aE =alpha(4);
%构件5的加速度
end six_bar MATLAB Answers — New Questions
Deploy Sophos userspecific VPN-configurations
Is there a way to deploy with one app in intune for each user a specific Sophos SSL VPN Configuration.
Each configuration is in the users OneDrive und needs to be copied in C:Program Files (x86)SophosSophos SSL VPN Clientconfig.
The users have no admin rights and can’t write in C:Program Files (x86)SophosSophos SSL VPN Clientconfig.
Is there a way to deploy with one app in intune for each user a specific Sophos SSL VPN Configuration.Each configuration is in the users OneDrive und needs to be copied in C:Program Files (x86)SophosSophos SSL VPN Clientconfig.The users have no admin rights and can’t write in C:Program Files (x86)SophosSophos SSL VPN Clientconfig. Read More
Device Preparation Policy – Microsoft store apps
I am not certain whether there is a bug in the apps in the device preparation or whether its done by design.
I have added some apps to be installed as part of the new autopilot v2.0 and non of the Microsoft store apps are installing, but the rest of the non Microsoft store apps are.
The rest of the Microsoft apps are reporting the same.
I am not certain whether there is a bug in the apps in the device preparation or whether its done by design. I have added some apps to be installed as part of the new autopilot v2.0 and non of the Microsoft store apps are installing, but the rest of the non Microsoft store apps are. The rest of the Microsoft apps are reporting the same. Read More
Azure Entra Connect
Hi all I am looking for some direction on how to deal with an issue that has arisen.
I have a client with an in-house on premises domain that has 2 domain controllers.
1 DC is Windows 2012 R2 and has an older version of Active Sync installed that stopped syncing in October 2023. The other DC is Windows 2022 and will become the ‘PDC” soon as the old one will be retired soon. Due to many reasons this was left past the desired time to be dealt with.
I have looked at this until my eyes have crossed.
Should I just disable sync using the web based Powershell and then start new with Entra Connect on the Windows 2022 server? The sync was mostly for efficiency so that the exchange O365 match users as we created them with password sync as well. There fore there will not be any issues I can see considering the sync has not been active since October 2023?
Or, should I setup the new server in staging mode, test the settings and then make it active? How will the orphaned server be dealt with since it has no way to even communcate that it is in staging mode?
Thanks for any thoughts
Hi all I am looking for some direction on how to deal with an issue that has arisen.I have a client with an in-house on premises domain that has 2 domain controllers.1 DC is Windows 2012 R2 and has an older version of Active Sync installed that stopped syncing in October 2023. The other DC is Windows 2022 and will become the ‘PDC” soon as the old one will be retired soon. Due to many reasons this was left past the desired time to be dealt with. I have looked at this until my eyes have crossed. Should I just disable sync using the web based Powershell and then start new with Entra Connect on the Windows 2022 server? The sync was mostly for efficiency so that the exchange O365 match users as we created them with password sync as well. There fore there will not be any issues I can see considering the sync has not been active since October 2023? Or, should I setup the new server in staging mode, test the settings and then make it active? How will the orphaned server be dealt with since it has no way to even communcate that it is in staging mode? Thanks for any thoughts Read More
Photos.onedrive pops up unexpectedly
I am new to OneDrive. I just uploaded all files recently and feeling my way along. When I am on my PC’s desktop and go to certain apps, for example Facebook or eBay, when I close, I return not to the desktop but to a tab screen of my OneDrive Personal photos. To get back to the desktop I must close that screen. This is bothersome because it is distracting. Is this happening due to a default I can change or disable? Thanks very much for any help or suggestions.
I am new to OneDrive. I just uploaded all files recently and feeling my way along. When I am on my PC’s desktop and go to certain apps, for example Facebook or eBay, when I close, I return not to the desktop but to a tab screen of my OneDrive Personal photos. To get back to the desktop I must close that screen. This is bothersome because it is distracting. Is this happening due to a default I can change or disable? Thanks very much for any help or suggestions. Read More
Testing Purview retention policies
Hello,
I’m looking for a method to report on if a retention policy is actually applying – for example, we have a policy that deletes emails older than 10 years. Is there something that I can show to prove it is working?
I’ve looked briefly in the audit logs, but that can be tricky to navigate.
Hello, I’m looking for a method to report on if a retention policy is actually applying – for example, we have a policy that deletes emails older than 10 years. Is there something that I can show to prove it is working?I’ve looked briefly in the audit logs, but that can be tricky to navigate. Read More
CoPilot in Old Outlook
Is there any plan for CoPilot to work in “old” outlook? Or setting “new” outlook up to look, feel, and function like “old” outlook.
Is there any plan for CoPilot to work in “old” outlook? Or setting “new” outlook up to look, feel, and function like “old” outlook. Read More
Does the Digilent Toolbox Add-On work with Matlab Library Compiler?
Does the Digilent Toolbox work with the Matlab Library compiler? I’m attempting to deploy a matlab .NET application, but when the deployed application runs the command
AO = daq("digilent")
it returns the exception "Specify an operational vendor" which tells me it doesn’t have the Digilent Toolbox info included in the compiled application.
I also don’t see Digilent Toolbox in the Suggested Support Packages in the Library Compiler application window.
Here is a link to the toolbox I’m referring to: https://www.mathworks.com/matlabcentral/fileexchange/122817-digilent-toolboxDoes the Digilent Toolbox work with the Matlab Library compiler? I’m attempting to deploy a matlab .NET application, but when the deployed application runs the command
AO = daq("digilent")
it returns the exception "Specify an operational vendor" which tells me it doesn’t have the Digilent Toolbox info included in the compiled application.
I also don’t see Digilent Toolbox in the Suggested Support Packages in the Library Compiler application window.
Here is a link to the toolbox I’m referring to: https://www.mathworks.com/matlabcentral/fileexchange/122817-digilent-toolbox Does the Digilent Toolbox work with the Matlab Library compiler? I’m attempting to deploy a matlab .NET application, but when the deployed application runs the command
AO = daq("digilent")
it returns the exception "Specify an operational vendor" which tells me it doesn’t have the Digilent Toolbox info included in the compiled application.
I also don’t see Digilent Toolbox in the Suggested Support Packages in the Library Compiler application window.
Here is a link to the toolbox I’m referring to: https://www.mathworks.com/matlabcentral/fileexchange/122817-digilent-toolbox digilent, compiler, toolbox MATLAB Answers — New Questions
How to use fminsearch for vectors
I searched for prior discussions on fminsearch, including one on "How to use fminsearch for a vector" and did not find what I am looking for.
I have two somewhat independent vectors of measured values, A and B. Is the optimisation a linear domain or a plane? I have had a quick look at optimvar, fminsearch, fmincon, and fminbnd and have not secured a result. Error on fminsearch is " Maximum number of function evaluations has been exceeded". Is there a more appropriate function than fminsearch? Thank you.
rng(‘shuffle’);
A = rand(1,10); % proxy for measured values
B = rand(1,10); % proxy for independent measured values
fun = @(ratio) min(sum(A.*ratio – B));
ratioRange = [1.0,1.2];
ratio = fminsearch(fun,ratioRange);I searched for prior discussions on fminsearch, including one on "How to use fminsearch for a vector" and did not find what I am looking for.
I have two somewhat independent vectors of measured values, A and B. Is the optimisation a linear domain or a plane? I have had a quick look at optimvar, fminsearch, fmincon, and fminbnd and have not secured a result. Error on fminsearch is " Maximum number of function evaluations has been exceeded". Is there a more appropriate function than fminsearch? Thank you.
rng(‘shuffle’);
A = rand(1,10); % proxy for measured values
B = rand(1,10); % proxy for independent measured values
fun = @(ratio) min(sum(A.*ratio – B));
ratioRange = [1.0,1.2];
ratio = fminsearch(fun,ratioRange); I searched for prior discussions on fminsearch, including one on "How to use fminsearch for a vector" and did not find what I am looking for.
I have two somewhat independent vectors of measured values, A and B. Is the optimisation a linear domain or a plane? I have had a quick look at optimvar, fminsearch, fmincon, and fminbnd and have not secured a result. Error on fminsearch is " Maximum number of function evaluations has been exceeded". Is there a more appropriate function than fminsearch? Thank you.
rng(‘shuffle’);
A = rand(1,10); % proxy for measured values
B = rand(1,10); % proxy for independent measured values
fun = @(ratio) min(sum(A.*ratio – B));
ratioRange = [1.0,1.2];
ratio = fminsearch(fun,ratioRange); fminsearch, vectors MATLAB Answers — New Questions
Robotic System Toolbox workspaceGoalRegion prevents me to make a right Pick and Place with a robot manipualtor, surrounded by collision object in the scenario.
I’m using the Robotic System Toolbox in order to plan the path of a Robotic Manipulator in a scenario full of collision objects. I’m using the function manipulatorRRT, then in the function ‘plan’ it asks me to put the start and goal configurations of the robot. I’m using the function ‘workspaceGoalRegion’ instead of giving the Joint Configuration matrix, because using ‘GoalRegion.ReferencePose=trvec2tform[ x y z ]’ I can calculate the Joint configuration of the robot starting from a point I want to reach in the space.
The problem is that it works until a collision object is in front of the robot. In that situation matlab starts a neverending loop and the programme never stops.
Here is the script I am talking about:
scenario = robotScenario(UpdateRate=10);
addMesh(scenario,"Box",Position=[0.35 0 0.2],Size=[0.5 0.9 0.05],Color=[0.7 0.7 0.7],Collision="mesh")
addMesh(scenario,"Box",Position=[0 -0.6 0.2],Size=[1.3 0.4 0.235],Color=[0.7 0.7 0.7],Collision="mesh")
addMesh(scenario,"Box",Position=[0.3 -0.25 0.4],Size=[0.8 0.03 0.35],Color=[0.7 0.7 0.7],Collision="mesh")
addMesh(scenario,"Box",Position=[0.52 0 0.278],Size=[0.06 0.06 0.1],Color=[1 0.5 0.25],Collision="mesh")
addMesh(scenario,"Box",Position=[0.4 -0.1 0.2758],Size=[0.06 0.06 0.1],Color=[1 0.5 0.25],Collision="mesh")
visuals = "on";
collisions = "off";
show3D(scenario,Visuals=visuals,Collisions=collisions);
title("Scene with collision object-based static meshes")
view(81,19)
light
franka = loadrobot("frankaEmikaPanda");
robot = robotPlatform("Manipulator",scenario,RigidBodyTree=franka,ReferenceFrame="ENU");
initialConfig = homeConfiguration(robot.RigidBodyTree);
initialConfig(7) = 0.65;
initialConfig(6) = 0.75;
boxToMove = robotPlatform("Box",scenario,Collision="mesh",InitialBasePosition=[0.5 0.15 0.278]);
updateMesh(boxToMove,"Cuboid",Collision="mesh",Size=[0.06 0.06 0.1],Color=[0.9 0.0 0.0]);
setup(scenario)
move(robot,"joint",initialConfig)
ax = show3D(scenario,Visuals=visuals,Collisions=collisions);
title("Scene with static meshes and robot platform")
view(81,19)
light
goalRegion = workspaceGoalRegion(franka.BodyNames{end});
goalRegion.ReferencePose=trvec2tform([0.5 0.15 0.278+0.05]);
goalRegion.Bounds(1, 🙂 = [0 0]; % X Bounds
goalRegion.Bounds(2, 🙂 = [0 0]; % Y Bounds
goalRegion.Bounds(4, 🙂 = [-pi/2 pi/2];
goalRegion.ReferencePose=goalRegion.ReferencePose*eul2tform([0 pi 0],"ZYX");
pickUpConfig=goalRegion;
%%
planner = manipulatorRRT(robot.RigidBodyTree,scenario.CollisionMeshes);
planner.MaxConnectionDistance = 0.6;
planner.ValidationDistance = 0.01;
planner.SkippedSelfCollisions = "parent";
planner.IgnoreSelfCollision = true;
rng("default")
path = plan(planner,initialConfig,pickUpConfig);
% Number of interpolations between each adjacent configuration.
numState = 10;
interpStates = interpolate(planner,path,numState);
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
title("Approaching towards pick-up location")
for idx = 1:size(interpStates,1)
% Get current joint configuration.
jointConfig = interpStates(idx,:);
% Move manipulator with current joint configuration.
move(robot,"joint",jointConfig)
% Use fast update to move platform visualization frames.
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
%Draw trajectory.
drawnow
% Advance scenario simulation time.
advance(scenario);
end
attach(robot,"Box","panda_hand",ChildToParentTransform=trvec2tform([0.0 0.0 0.1]))
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
title("Picked-up target box")
startConfig=path(end,:);
goalRegion.ReferencePose=trvec2tform([0.4 -0.6 0.4]);
goalRegion.ReferencePose=goalRegion.ReferencePose*eul2tform([0 pi 0],"ZYX");
dropConfig=goalRegion;
planner = manipulatorRRT(robot.RigidBodyTree,scenario.CollisionMeshes);
planner.MaxConnectionDistance = 0.6;
planner.ValidationDistance = 0.01;
planner.SkippedSelfCollisions = "parent";
planner.IgnoreSelfCollision = true;
path = plan(planner,startConfig,dropConfig);
interpStates = interpolate(planner,path,numState);
% Visualize scene
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
title("Approaching towards drop location")
for idx = 1:size(interpStates,1)
% Get current joint configuration.
jointConfig = interpStates(idx,:);
% Move manipulator with current joint configuration.
move(robot,"joint",jointConfig)
% Use fast update to move platform visualization frames.
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
%Draw trajectory.
drawnow
% Advance scenario simulation time.
advance(scenario);
end
detach(robot)
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
title("Placed target box at drop location")
read(robot,"joint")I’m using the Robotic System Toolbox in order to plan the path of a Robotic Manipulator in a scenario full of collision objects. I’m using the function manipulatorRRT, then in the function ‘plan’ it asks me to put the start and goal configurations of the robot. I’m using the function ‘workspaceGoalRegion’ instead of giving the Joint Configuration matrix, because using ‘GoalRegion.ReferencePose=trvec2tform[ x y z ]’ I can calculate the Joint configuration of the robot starting from a point I want to reach in the space.
The problem is that it works until a collision object is in front of the robot. In that situation matlab starts a neverending loop and the programme never stops.
Here is the script I am talking about:
scenario = robotScenario(UpdateRate=10);
addMesh(scenario,"Box",Position=[0.35 0 0.2],Size=[0.5 0.9 0.05],Color=[0.7 0.7 0.7],Collision="mesh")
addMesh(scenario,"Box",Position=[0 -0.6 0.2],Size=[1.3 0.4 0.235],Color=[0.7 0.7 0.7],Collision="mesh")
addMesh(scenario,"Box",Position=[0.3 -0.25 0.4],Size=[0.8 0.03 0.35],Color=[0.7 0.7 0.7],Collision="mesh")
addMesh(scenario,"Box",Position=[0.52 0 0.278],Size=[0.06 0.06 0.1],Color=[1 0.5 0.25],Collision="mesh")
addMesh(scenario,"Box",Position=[0.4 -0.1 0.2758],Size=[0.06 0.06 0.1],Color=[1 0.5 0.25],Collision="mesh")
visuals = "on";
collisions = "off";
show3D(scenario,Visuals=visuals,Collisions=collisions);
title("Scene with collision object-based static meshes")
view(81,19)
light
franka = loadrobot("frankaEmikaPanda");
robot = robotPlatform("Manipulator",scenario,RigidBodyTree=franka,ReferenceFrame="ENU");
initialConfig = homeConfiguration(robot.RigidBodyTree);
initialConfig(7) = 0.65;
initialConfig(6) = 0.75;
boxToMove = robotPlatform("Box",scenario,Collision="mesh",InitialBasePosition=[0.5 0.15 0.278]);
updateMesh(boxToMove,"Cuboid",Collision="mesh",Size=[0.06 0.06 0.1],Color=[0.9 0.0 0.0]);
setup(scenario)
move(robot,"joint",initialConfig)
ax = show3D(scenario,Visuals=visuals,Collisions=collisions);
title("Scene with static meshes and robot platform")
view(81,19)
light
goalRegion = workspaceGoalRegion(franka.BodyNames{end});
goalRegion.ReferencePose=trvec2tform([0.5 0.15 0.278+0.05]);
goalRegion.Bounds(1, 🙂 = [0 0]; % X Bounds
goalRegion.Bounds(2, 🙂 = [0 0]; % Y Bounds
goalRegion.Bounds(4, 🙂 = [-pi/2 pi/2];
goalRegion.ReferencePose=goalRegion.ReferencePose*eul2tform([0 pi 0],"ZYX");
pickUpConfig=goalRegion;
%%
planner = manipulatorRRT(robot.RigidBodyTree,scenario.CollisionMeshes);
planner.MaxConnectionDistance = 0.6;
planner.ValidationDistance = 0.01;
planner.SkippedSelfCollisions = "parent";
planner.IgnoreSelfCollision = true;
rng("default")
path = plan(planner,initialConfig,pickUpConfig);
% Number of interpolations between each adjacent configuration.
numState = 10;
interpStates = interpolate(planner,path,numState);
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
title("Approaching towards pick-up location")
for idx = 1:size(interpStates,1)
% Get current joint configuration.
jointConfig = interpStates(idx,:);
% Move manipulator with current joint configuration.
move(robot,"joint",jointConfig)
% Use fast update to move platform visualization frames.
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
%Draw trajectory.
drawnow
% Advance scenario simulation time.
advance(scenario);
end
attach(robot,"Box","panda_hand",ChildToParentTransform=trvec2tform([0.0 0.0 0.1]))
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
title("Picked-up target box")
startConfig=path(end,:);
goalRegion.ReferencePose=trvec2tform([0.4 -0.6 0.4]);
goalRegion.ReferencePose=goalRegion.ReferencePose*eul2tform([0 pi 0],"ZYX");
dropConfig=goalRegion;
planner = manipulatorRRT(robot.RigidBodyTree,scenario.CollisionMeshes);
planner.MaxConnectionDistance = 0.6;
planner.ValidationDistance = 0.01;
planner.SkippedSelfCollisions = "parent";
planner.IgnoreSelfCollision = true;
path = plan(planner,startConfig,dropConfig);
interpStates = interpolate(planner,path,numState);
% Visualize scene
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
title("Approaching towards drop location")
for idx = 1:size(interpStates,1)
% Get current joint configuration.
jointConfig = interpStates(idx,:);
% Move manipulator with current joint configuration.
move(robot,"joint",jointConfig)
% Use fast update to move platform visualization frames.
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
%Draw trajectory.
drawnow
% Advance scenario simulation time.
advance(scenario);
end
detach(robot)
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
title("Placed target box at drop location")
read(robot,"joint") I’m using the Robotic System Toolbox in order to plan the path of a Robotic Manipulator in a scenario full of collision objects. I’m using the function manipulatorRRT, then in the function ‘plan’ it asks me to put the start and goal configurations of the robot. I’m using the function ‘workspaceGoalRegion’ instead of giving the Joint Configuration matrix, because using ‘GoalRegion.ReferencePose=trvec2tform[ x y z ]’ I can calculate the Joint configuration of the robot starting from a point I want to reach in the space.
The problem is that it works until a collision object is in front of the robot. In that situation matlab starts a neverending loop and the programme never stops.
Here is the script I am talking about:
scenario = robotScenario(UpdateRate=10);
addMesh(scenario,"Box",Position=[0.35 0 0.2],Size=[0.5 0.9 0.05],Color=[0.7 0.7 0.7],Collision="mesh")
addMesh(scenario,"Box",Position=[0 -0.6 0.2],Size=[1.3 0.4 0.235],Color=[0.7 0.7 0.7],Collision="mesh")
addMesh(scenario,"Box",Position=[0.3 -0.25 0.4],Size=[0.8 0.03 0.35],Color=[0.7 0.7 0.7],Collision="mesh")
addMesh(scenario,"Box",Position=[0.52 0 0.278],Size=[0.06 0.06 0.1],Color=[1 0.5 0.25],Collision="mesh")
addMesh(scenario,"Box",Position=[0.4 -0.1 0.2758],Size=[0.06 0.06 0.1],Color=[1 0.5 0.25],Collision="mesh")
visuals = "on";
collisions = "off";
show3D(scenario,Visuals=visuals,Collisions=collisions);
title("Scene with collision object-based static meshes")
view(81,19)
light
franka = loadrobot("frankaEmikaPanda");
robot = robotPlatform("Manipulator",scenario,RigidBodyTree=franka,ReferenceFrame="ENU");
initialConfig = homeConfiguration(robot.RigidBodyTree);
initialConfig(7) = 0.65;
initialConfig(6) = 0.75;
boxToMove = robotPlatform("Box",scenario,Collision="mesh",InitialBasePosition=[0.5 0.15 0.278]);
updateMesh(boxToMove,"Cuboid",Collision="mesh",Size=[0.06 0.06 0.1],Color=[0.9 0.0 0.0]);
setup(scenario)
move(robot,"joint",initialConfig)
ax = show3D(scenario,Visuals=visuals,Collisions=collisions);
title("Scene with static meshes and robot platform")
view(81,19)
light
goalRegion = workspaceGoalRegion(franka.BodyNames{end});
goalRegion.ReferencePose=trvec2tform([0.5 0.15 0.278+0.05]);
goalRegion.Bounds(1, 🙂 = [0 0]; % X Bounds
goalRegion.Bounds(2, 🙂 = [0 0]; % Y Bounds
goalRegion.Bounds(4, 🙂 = [-pi/2 pi/2];
goalRegion.ReferencePose=goalRegion.ReferencePose*eul2tform([0 pi 0],"ZYX");
pickUpConfig=goalRegion;
%%
planner = manipulatorRRT(robot.RigidBodyTree,scenario.CollisionMeshes);
planner.MaxConnectionDistance = 0.6;
planner.ValidationDistance = 0.01;
planner.SkippedSelfCollisions = "parent";
planner.IgnoreSelfCollision = true;
rng("default")
path = plan(planner,initialConfig,pickUpConfig);
% Number of interpolations between each adjacent configuration.
numState = 10;
interpStates = interpolate(planner,path,numState);
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
title("Approaching towards pick-up location")
for idx = 1:size(interpStates,1)
% Get current joint configuration.
jointConfig = interpStates(idx,:);
% Move manipulator with current joint configuration.
move(robot,"joint",jointConfig)
% Use fast update to move platform visualization frames.
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
%Draw trajectory.
drawnow
% Advance scenario simulation time.
advance(scenario);
end
attach(robot,"Box","panda_hand",ChildToParentTransform=trvec2tform([0.0 0.0 0.1]))
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
title("Picked-up target box")
startConfig=path(end,:);
goalRegion.ReferencePose=trvec2tform([0.4 -0.6 0.4]);
goalRegion.ReferencePose=goalRegion.ReferencePose*eul2tform([0 pi 0],"ZYX");
dropConfig=goalRegion;
planner = manipulatorRRT(robot.RigidBodyTree,scenario.CollisionMeshes);
planner.MaxConnectionDistance = 0.6;
planner.ValidationDistance = 0.01;
planner.SkippedSelfCollisions = "parent";
planner.IgnoreSelfCollision = true;
path = plan(planner,startConfig,dropConfig);
interpStates = interpolate(planner,path,numState);
% Visualize scene
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
title("Approaching towards drop location")
for idx = 1:size(interpStates,1)
% Get current joint configuration.
jointConfig = interpStates(idx,:);
% Move manipulator with current joint configuration.
move(robot,"joint",jointConfig)
% Use fast update to move platform visualization frames.
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
%Draw trajectory.
drawnow
% Advance scenario simulation time.
advance(scenario);
end
detach(robot)
show3D(scenario,FastUpdate=true,Parent=ax,Visuals=visuals,Collisions=collisions);
title("Placed target box at drop location")
read(robot,"joint") workspacegoalregion, manipulatorrrt, plan MATLAB Answers — New Questions
PowerShell – How to Download Email Attachments from Exchange Server
I have a big task and I don’t know if this can be done through VBA. Let me explain what I need to be done.
1. I have several clients that I setup an email address through Exchange server (not my personal outlook inbox) with a user name and password.
2. Then I have several customers that sending email attachment for that particular client. Let say one of the client’s name Troy Corporation and the email will be email address removed for privacy reasons.
The customer’s name is: Daybreak Fast, FedEx Freight, R&L Carriers, and TRN Logistics. All the customers are sending email attachment into Troy Corporation mailbox. Side Note: (sometimes I have different customer send the attached file. Let say this I have this week Mr. email address removed for privacy reasons and next week I have Mrs. email address removed for privacy reasons I need the program to check for both emails to see if one of them send me a file.
What I need is to do is login to mailbox (Troy Corporation) retrieve each email with the attached file for each customer, then download them to my network folder. If I did not receive an attachment for any of the customer to send them a second request with a note on the body “we did not receive your file” something like that.
3. So, when I login for second time to retrieve the remaining attached file. But if I did receive the email attachment either on the first or the second attempt, the customer SHOULD NOT RECEIVE a second request because I did receive their file.
I do have more after all the files are download to my network folder. But I want to know if this can be done through Power Shell.
I have a big task and I don’t know if this can be done through VBA. Let me explain what I need to be done.1. I have several clients that I setup an email address through Exchange server (not my personal outlook inbox) with a user name and password.2. Then I have several customers that sending email attachment for that particular client. Let say one of the client’s name Troy Corporation and the email will be email address removed for privacy reasons. The customer’s name is: Daybreak Fast, FedEx Freight, R&L Carriers, and TRN Logistics. All the customers are sending email attachment into Troy Corporation mailbox. Side Note: (sometimes I have different customer send the attached file. Let say this I have this week Mr. email address removed for privacy reasons and next week I have Mrs. email address removed for privacy reasons I need the program to check for both emails to see if one of them send me a file.What I need is to do is login to mailbox (Troy Corporation) retrieve each email with the attached file for each customer, then download them to my network folder. If I did not receive an attachment for any of the customer to send them a second request with a note on the body “we did not receive your file” something like that.3. So, when I login for second time to retrieve the remaining attached file. But if I did receive the email attachment either on the first or the second attempt, the customer SHOULD NOT RECEIVE a second request because I did receive their file.I do have more after all the files are download to my network folder. But I want to know if this can be done through Power Shell. Read More
inclusion of Copilot for 365 features in the partnership benefits
inclusion of Copilot for 365 features in the partnership benefits
inclusion of Copilot for 365 features in the partnership benefits Read More
Unable to edit in grid view
The ‘edit in grid view’ button does not appear for me in a sharepoint library. I have no filters or grouping on the library. I need to be able to use this grid view in order to edit columns in the library. Any ideas?
The ‘edit in grid view’ button does not appear for me in a sharepoint library. I have no filters or grouping on the library. I need to be able to use this grid view in order to edit columns in the library. Any ideas? Read More
Syntex Models Stopped Applying Yesterday
Not sure what update got pushed out but all my models stopped applying to my DLs starting last night. Anyone else having issues?
Not sure what update got pushed out but all my models stopped applying to my DLs starting last night. Anyone else having issues? Read More