Category: News
Prompt Like a Pro: Effectively summarize your channel conversations with Microsoft Copilot in Teams
Keeping up with your information can be a challenge in today’s fast-paced environment. Microsoft Teams channels help you have all your information related to a certain topic in one place. Yet sometimes the conversation progresses fast, and you need help catching up. This is especially true when you’re part of multiple teams and projects. With important documents being shared, ongoing conversations, and comments being added to threads, it can feel overwhelming! However, with a few simple tips and tricks, you can stay on top of your channels and avoid missing important updates. To stay in the know across all your different channels – and the teams associated with those channels – look no further than Microsoft Copilot in Teams!
Get channel highlights with Copilot in Teams
Say it’s been a busy day. On top of all the emails you need to answer and chat threads to respond to, there are also all the unresolved projects and updates in your Teams channels. Copilot in Teams can help you get up to speed, fast! Navigate over to your “Chat” tab in Teams and click on the Copilot icon at the top of your chats. This opens Copilot for Microsoft 365 in Teams, which will be able to use data grounded in the Microsoft Graph to answer your questions. To start, use the prompt “What’s new in [channel] of [team]?” For example, I want to find out what I missed from the Go to Market channel in my Mark 8 Project team, so I would ask Copilot: “What’s new in the Go to Market channel of the Mark 8 Project team?”
Copilot quickly scans through that specific channel and tells me when the latest update was, who was involved in that change, if there were any new documents shared, and even links to that update, making it easy to navigate directly to that thread. When prompting, make sure you give Copilot the correct spelling of the team name in your prompt, otherwise it may not search for the right channel.
Dive deeper with follow-up prompts
To go one step further, Copilot provides you with auto-generated prompts that you can use to follow up on the response it provided you from your first prompt. Going back to my example, Copilot told me that one of the members of my channel, Hadar Caspit, shared a Go-to-market plan document with the team. Instead of trying to navigate through to the different channels, teams, and posts, Copilot already suggested a follow-up prompt for me, “What are the key points in the Go-to-market plan?”
By clicking that prompt, Copilot pulls up a simple yet effective overview of the document, including the target audience, product and price strategies, etc. These follow-up prompts will change depending on the context of your team and what updates have happened to that channel since the last time you checked in. What will remain the same, however, is that they are all offered by Copilot as easy ways to go more in-depth about those updates without having to leave your Copilot conversation to find that information yourself.
Leverage relevant documents with the power of Microsoft Graph
Copilot uses Microsoft Graph** to pull any relevant documents into its output. This is possible thanks to Microsoft Copilot’s Graph-grounded chat, which enables you to bring your work content and context to Microsoft Copilot’s chat capabilities. With Graph-grounded chat, you can draft content, catch up on what you missed, and get answers to questions via open-ended prompts— all securely grounded in your work data.
Again, let’s go back to this Go-to-market plan that was shared in my channel. Aside from that great summary, Copilot linked the document for me directly in its answer. Now I don’t even need to leave this chat with Copilot to access the document it was summarizing for me. All it takes is one click, and I am brought directly to the Word document containing the GTM plan I had asked about.
Catch up on your channels from one place
Even when it feels like the number of Teams channels you belong to – and their constant updates – make it challenging to keep track of everything, everywhere, all at once, this prompt will help make those issues a thing of the past. Copilot allows you to check in and catch up on those Teams channels, all from one simple prompt! It can help you summarize, visualize, and access documents without having to hunt through dozens of threads and replies to access that same information, making it easier for you to stay on top of your work and be more efficient, responsive, and productive. Be sure to use the recommended follow-up prompts to double-down on specific updates and get the most out of every channel, with Copilot.
Additional resources
For more examples of prompts that Copilot can help you with, check out Copilot Lab! Filter by M365 app – Teams – to learn what prompts to use for meetings, in chats, and get tips for better optimized prompts in Teams and beyond!
What’s coming next
Stay tuned for more tips on how to work with Copilot in Microsoft Teams and before you know it you will be prompting like a pro! If you’re already using Copilot in Teams, share your favorite prompts in the comments for the chance to get featured in a future “Prompt Like a Pro” blog spotlighting some community favorites!
*Copilot in Teams is constantly evolving and improving thanks to your input and feedback. If a Copilot prompt does not work the way you expect it to, let us know how by using the thumbs-down button that appears after a response.
** Copilot’s answers are grounded in the work content and context stored in Microsoft Graph.
Microsoft Tech Community – Latest Blogs –Read More
New: Secure Sandboxes at Scale with Azure Container Apps Dynamic Sessions
We’re excited to announce the public preview of Azure Container Apps dynamic sessions. Azure Container Apps is a serverless platform that enables you to run containerized workloads without managing the underlying infrastructure. Dynamic sessions adds the ability to execute untrusted code in secure, sandboxed environments at scale.
When you build applications that run code or commands from untrusted sources, you must ensure that the code runs in its own isolated environment. Dynamic sessions provide secure, ephemeral sandboxes called “sessions” for running potentially malicious code. Each session runs in its own Hyper-V virtualization boundary — ensuring complete isolation from other sessions and resources.
Dynamic sessions are ideal for running untrusted code in hostile multi-tenant scenarios such as:
Running code generated by a large language model (LLM).
Running code or commands submitted by cloud application users.
Running cloud-based development environments, terminals, and more.
To build a secure and efficient compute environment for these scenarios, you need to possess strong security expertise and invest in building and maintaining a secure infrastructure at high scale. Azure Container Apps dynamic sessions abstracts away the complexity of managing secure sandboxes, allowing you to focus on building your application.
Tested and proven
With dynamic sessions, you now have access to the same battle-tested and highly scalable technology that Microsoft relies on to power unique features and experiences. Every day, millions of sessions are used to securely run untrusted code.
Instant code execution
Azure Container Apps automatically manages pools of resources to ensure there’s always a session that’s ready to use. It takes just milliseconds to access a session and execute code. Each session maintains state and can be reused for multiple code executions in a single security context. Sessions are ephemeral and are automatically cleaned up after a configurable idle timeout.
Built-in code interpreter
Out of the box, dynamic sessions comes with a built-in Python code interpreter that’s preinstalled with many popular libraries. You can execute Python code by calling a simple REST API. The code interpreter also supports uploading and downloading files, allowing you to bring your own Python modules or import data or files to process.
Sessions using the built-in code interpreter are billed on a consumption basis at US$0.03 per session-hour.
LangChain, LlamaIndex, and Semantic Kernel integrations
Recently, AI agents have seen a surge in popularity. A limitation of these agents is that the LLMs they rely on are unable to perform certain tasks involving math and other computations. When given access to dynamic sessions’ code interpreter, an LLM can write Python code to solve complex problems and an agent executes it to produce accurate responses.
However, LLM-generated code occasionally produces unpredictable results, and the code may be harmful when given malicious input. So, it’s important to provide each AI agent conversation with its own isolated code interpreter.
You can integrate the code interpreter in dynamic sessions with popular AI agent frameworks in a few lines of code. To learn more, see the tutorial for each framework:
LangChain
LlamaIndex
Semantic Kernel
More integrations are on the way. If you have suggestions, please let us know or contribute an integration to that project directly.
Custom container sessions
Do you want to build your own custom code interpreter or have an entirely different scenario to run in dynamic sessions? You can bring your own custom container. We’ll have more to share next week at Microsoft Build.
Get started with code interpreter sessions
Use Azure Container Apps dynamic sessions today. Learn more in our documentation.
Join us at PyCon US 2024
If you’re at PyCon US 2024, come to our session on May 16 or visit our booth to learn more about dynamic sessions.
More at Microsoft Build 2024
We’ll have more next week at Microsoft Build, including custom container sessions and Azure portal experiences. Join us in our session BRK131: Serverless architectures: Effortless Intelligent Apps at extreme scale
Microsoft Tech Community – Latest Blogs –Read More
Error in ode45 (line 107)
Hello, I’m trying to model the biomass accumulation over time of a microorganism that depends on temperature using a differential equation that I want to solve with ode45 function. But I got this error message:
Error using odearguments
@(TIME,XI)DXDT(TIME,XI,TEMP,PARAM,PARAM_PH,PH) returns a vector of length 29613, but the length of initial conditions vector is 1. The vector returned by
@(TIME,XI)DXDT(TIME,XI,TEMP,PARAM,PARAM_PH,PH) and the initial conditions vector must have the same number of elements.
Error in ode45 (line 107)
odearguments(odeIsFuncHandle,odeTreatAsMFile, solver_name, ode, tspan, y0, options, varargin);
After checking, I figured out that the ode45 function doesn’t take my temperature vector but only one cell of it (knowing that the size of my temperature and time vectors is the same).
Can you help me out to solve this issue please?
Here is my code for ode45:
tspan = Time; %Time vector with the same length as experimental data
%C0 is the initial biomass concentration
%the vector param contains my parameters [tmin,topt,tmax,mumax]
[t,xi] = ode45(@(t,xi) dxdt(t,xi,temperature,param),tspan,C0, odeset(‘RelTol’,1E-3));
Here is my dfunction to calculate the ifferential equation:
function dC=dxdt(t,C,Temp,param,param_ph,pH)
dC=C.*phi(param,Temp);
end
Thanks in advance for you help :)Hello, I’m trying to model the biomass accumulation over time of a microorganism that depends on temperature using a differential equation that I want to solve with ode45 function. But I got this error message:
Error using odearguments
@(TIME,XI)DXDT(TIME,XI,TEMP,PARAM,PARAM_PH,PH) returns a vector of length 29613, but the length of initial conditions vector is 1. The vector returned by
@(TIME,XI)DXDT(TIME,XI,TEMP,PARAM,PARAM_PH,PH) and the initial conditions vector must have the same number of elements.
Error in ode45 (line 107)
odearguments(odeIsFuncHandle,odeTreatAsMFile, solver_name, ode, tspan, y0, options, varargin);
After checking, I figured out that the ode45 function doesn’t take my temperature vector but only one cell of it (knowing that the size of my temperature and time vectors is the same).
Can you help me out to solve this issue please?
Here is my code for ode45:
tspan = Time; %Time vector with the same length as experimental data
%C0 is the initial biomass concentration
%the vector param contains my parameters [tmin,topt,tmax,mumax]
[t,xi] = ode45(@(t,xi) dxdt(t,xi,temperature,param),tspan,C0, odeset(‘RelTol’,1E-3));
Here is my dfunction to calculate the ifferential equation:
function dC=dxdt(t,C,Temp,param,param_ph,pH)
dC=C.*phi(param,Temp);
end
Thanks in advance for you help 🙂 Hello, I’m trying to model the biomass accumulation over time of a microorganism that depends on temperature using a differential equation that I want to solve with ode45 function. But I got this error message:
Error using odearguments
@(TIME,XI)DXDT(TIME,XI,TEMP,PARAM,PARAM_PH,PH) returns a vector of length 29613, but the length of initial conditions vector is 1. The vector returned by
@(TIME,XI)DXDT(TIME,XI,TEMP,PARAM,PARAM_PH,PH) and the initial conditions vector must have the same number of elements.
Error in ode45 (line 107)
odearguments(odeIsFuncHandle,odeTreatAsMFile, solver_name, ode, tspan, y0, options, varargin);
After checking, I figured out that the ode45 function doesn’t take my temperature vector but only one cell of it (knowing that the size of my temperature and time vectors is the same).
Can you help me out to solve this issue please?
Here is my code for ode45:
tspan = Time; %Time vector with the same length as experimental data
%C0 is the initial biomass concentration
%the vector param contains my parameters [tmin,topt,tmax,mumax]
[t,xi] = ode45(@(t,xi) dxdt(t,xi,temperature,param),tspan,C0, odeset(‘RelTol’,1E-3));
Here is my dfunction to calculate the ifferential equation:
function dC=dxdt(t,C,Temp,param,param_ph,pH)
dC=C.*phi(param,Temp);
end
Thanks in advance for you help 🙂 error in ode45 (line 107) MATLAB Answers — New Questions
ZEDBOARD UART-USB matlab setup on linux
hello i am new to zedboard and am trying to set up the hardware since the past few weeks so any help would be great. i am trying to connect the board to the development computer
matlab version-R2022b
os-Ubuntu 20.04.3 LTS
i have used HDL Coder Support Package for Xilinx Zynq Platform
i keep getting this error and im not sure how to resolve it
any and all help would be appreciated thank you
———————————————————————————————————
attempts done:
1)i have tried to setup serial port using s=serialport(‘dev/ttyACM0’,115200); fopen(s) then tried the hardware
2)i have given permissions for dev/ttyACM0 by chmod 666
3)i have used putty to communicate with the zynq boardhello i am new to zedboard and am trying to set up the hardware since the past few weeks so any help would be great. i am trying to connect the board to the development computer
matlab version-R2022b
os-Ubuntu 20.04.3 LTS
i have used HDL Coder Support Package for Xilinx Zynq Platform
i keep getting this error and im not sure how to resolve it
any and all help would be appreciated thank you
———————————————————————————————————
attempts done:
1)i have tried to setup serial port using s=serialport(‘dev/ttyACM0’,115200); fopen(s) then tried the hardware
2)i have given permissions for dev/ttyACM0 by chmod 666
3)i have used putty to communicate with the zynq board hello i am new to zedboard and am trying to set up the hardware since the past few weeks so any help would be great. i am trying to connect the board to the development computer
matlab version-R2022b
os-Ubuntu 20.04.3 LTS
i have used HDL Coder Support Package for Xilinx Zynq Platform
i keep getting this error and im not sure how to resolve it
any and all help would be appreciated thank you
———————————————————————————————————
attempts done:
1)i have tried to setup serial port using s=serialport(‘dev/ttyACM0’,115200); fopen(s) then tried the hardware
2)i have given permissions for dev/ttyACM0 by chmod 666
3)i have used putty to communicate with the zynq board #uart-usb, #zedboard, #hdlcoder, zynq MATLAB Answers — New Questions
Error using open ep/requirement/al/keys/RequirementsSourceKey whey lauching Simulink Project
Hello,
I got an ‘Error using open ep/requirement/al/keys/RequirementsSourceKey" when I launch the Simulink Project. This error appears irregularily and I don’t know what causes it and it means !
Does any one know about it ?
With advance thanks !
Riad Boukhari.Hello,
I got an ‘Error using open ep/requirement/al/keys/RequirementsSourceKey" when I launch the Simulink Project. This error appears irregularily and I don’t know what causes it and it means !
Does any one know about it ?
With advance thanks !
Riad Boukhari. Hello,
I got an ‘Error using open ep/requirement/al/keys/RequirementsSourceKey" when I launch the Simulink Project. This error appears irregularily and I don’t know what causes it and it means !
Does any one know about it ?
With advance thanks !
Riad Boukhari. simulink, simulink project, matlab 2022b MATLAB Answers — New Questions
Sharepoint formular syntax error
Hey im working on a Filtered Lookup list that i need to only use the products that is avalible
i Tried using the Formular:
=IF([Status]=”Tilgængelig”,[Titel],””) and get mistake in syntax i am at a loss?
pls help
Hey im working on a Filtered Lookup list that i need to only use the products that is avaliblei Tried using the Formular:=IF([Status]=”Tilgængelig”,[Titel],””) and get mistake in syntax i am at a loss?pls help Read More
not able to update windows
sir i am not getting windows update on beta channel since october 2023. f
sir i am not getting windows update on beta channel since october 2023. f Read More
Security baseline + data protection baseline for M365
Hello,
I am trying to add a Secrurity baseline + data protection baseline for M365 in Compliance assessments. Both of them are showing me an incomplete status. I can’t find anywhere why and what it needs from me to change the status.
Any advice please where I can check it why!?
Thank you very much
Hello,I am trying to add a Secrurity baseline + data protection baseline for M365 in Compliance assessments. Both of them are showing me an incomplete status. I can’t find anywhere why and what it needs from me to change the status.Any advice please where I can check it why!?Thank you very much Read More
audio problem error
whenever i use yutube it shows audio renderd error
whenever i use yutube it shows audio renderd error Read More
ENDPoint monitoring
I cant detect USB/ Remote-Print activity within Purview.
I cant detect USB/ Remote-Print activity within Purview. Read More
SharePoint – Sum values in a column based on value in a separate column
Hello. I’m fairly new to SharePoint, but have some experience. Using my “Irradiation Entries” list, I am wanting to sum the values in “Total uAh” for the corresponding “Rabbit Body ID” values in a separate view or separate list called “Rabbit Log”. What would be the best way to go about this?
I appreciate any help in advance…Thanks for the time and consideration!!!
Hello. I’m fairly new to SharePoint, but have some experience. Using my “Irradiation Entries” list, I am wanting to sum the values in “Total uAh” for the corresponding “Rabbit Body ID” values in a separate view or separate list called “Rabbit Log”. What would be the best way to go about this? I appreciate any help in advance…Thanks for the time and consideration!!! Read More
Remote Desktop v10.5.6 – Mouse Pointer Issues with iPad Pro M4 13”
When using Remote Desktop v10.5.6 on the iPad Pro M4 13”, the mouse pointer does not properly align with items to click on. I’m guessing the supported resolutions are also not correct.
When using Remote Desktop v10.5.6 on the iPad Pro M4 13”, the mouse pointer does not properly align with items to click on. I’m guessing the supported resolutions are also not correct. Read More
Teams Webinar Can’t edit internal presenter bio
Trying to set up a new webinar but I’m not able to edit the bio of an internal presenter. I’m organizer and presenter but I can’t edit the bio because the save button is greyed out.
I have already tried it with Teams for Windows, Teams for Mac and also in the browser. The same result everywhere, the button is greyed out. In contrast, I can edit and save the theming. Duplicating an older webinar (where the correct bio is already included) cannot be saved either. Error message “Something went wrong, and we need to try again.“
I think this is a “new” Teams related issue but I’m not sure. Any idea.
Thomas
Trying to set up a new webinar but I’m not able to edit the bio of an internal presenter. I’m organizer and presenter but I can’t edit the bio because the save button is greyed out. I have already tried it with Teams for Windows, Teams for Mac and also in the browser. The same result everywhere, the button is greyed out. In contrast, I can edit and save the theming. Duplicating an older webinar (where the correct bio is already included) cannot be saved either. Error message “Something went wrong, and we need to try again.” I think this is a “new” Teams related issue but I’m not sure. Any idea. Thomas Read More
In a New Teams application I only see teams of organisationsI am guest in. But not my org. teams.
In a New Teams application I only see teams of organisations I am guest in. But not my org. teams. When on web, everything seems ok and working.
In old teams app also was ok.
This is now useles app for me. I alredy went through copilot suggested steps of troubleshooting. Is that something I should set differently in some settings?
Thanks!
In a New Teams application I only see teams of organisations I am guest in. But not my org. teams. When on web, everything seems ok and working. In old teams app also was ok. This is now useles app for me. I alredy went through copilot suggested steps of troubleshooting. Is that something I should set differently in some settings? Thanks! Read More
Microsoft Dynamics 365: Finance and Operations Apps Solution Architect Blueprint Opportunity
Microsoft is updating a certification for Microsoft Dynamics 365: Finance and Operations Apps Solution Architect, and we need your input through our exam blueprinting survey.
The blueprint determines how many questions each skill in the exam will be assigned. Please complete the online survey by May 30th, 2024. Please also feel free to forward the survey to any colleagues you consider subject matter experts for this certification. If you have any questions, feel free to contact Rohan Mahadevan rmahadevan@microsoft.com or John Sowles at josowles@microsoft.com.
Microsoft Dynamics 365: Finance and Operations Apps Solution Architect blueprint survey link:
https://microsoftlearning.co1.qualtrics.com/jfe/form/SV_8ulKULcngoP1EFM
Microsoft is updating a certification for Microsoft Dynamics 365: Finance and Operations Apps Solution Architect, and we need your input through our exam blueprinting survey.
The blueprint determines how many questions each skill in the exam will be assigned. Please complete the online survey by May 30th, 2024. Please also feel free to forward the survey to any colleagues you consider subject matter experts for this certification. If you have any questions, feel free to contact Rohan Mahadevan rmahadevan@microsoft.com or John Sowles at josowles@microsoft.com.
Microsoft Dynamics 365: Finance and Operations Apps Solution Architect blueprint survey link:
https://microsoftlearning.co1.qualtrics.com/jfe/form/SV_8ulKULcngoP1EFM Read More
Copilot are we besties?
Copilot are we besties?
Of course! When you design eLearning modules, it is very important to create clear learning objectives. These objectives are the core of your course’s goal, explaining what you expect learners to accomplish after finishing it.
Copilot has been very helpful for me in this process. I’m not sure about you, but I sometimes have trouble with creating objectives for my courses. I used Copilot to review my objectives and to see how well I explained what the learners should learn.
I prefer PowerPoint for Storyboarding content, as it works well with System Matter Experts. But I recently found Microsoft Copilot with Graph-grounded chat, formerly Microsoft 365 Chat. It helps me make storyboards for eLearning modules, presentations, or other content.
I am gradually switching from PowerPoint to Graph-grounded chat. PowerPoint has a Copilot feature that is very useful, so I don’t have to hurry, but it’s nice to see how Copilot is really assisting us eLearning developers.
Copilot with teams is one of the best Copilot features that has assisted me in eLearning content. You can give Copilot some useful information after a Teams meeting, like meeting notes, recorded transcripts, or key discussion points. I have used this information to help make realistic and relevant eLearning content.
I have also used the information from Teams meeting as a guide for SMEs to provide content information. I used to have difficulty with making outlines for our SMEs to follow based on previous meetings, but not anymore. My new best friend Copilot is there for me and assists when I need it.
That’s all folks! I hope this blog was enjoyable. Copilot has changed my life. It is like having a friend for eLearning and instructional design. The goal is to work smarter not harder, and Copilot is the perfect tool to help.
Microsoft Tech Community – Latest Blogs –Read More
my license for database toolbox isn’t linked to mobile Matlab
I have bought the license of Database Toolbox and it wotks fine in Mac. When I try to connect with an sqlite .db file in the iPad Pro, I got an error message ‘require Database Toolbox require’.
I contacted Mathworks suppirt, but it was Terasoft Tech Support that responded (I don’t understand why that happened). They suggested me to link my license with my Mathworks user account, but I already did. Mobile Matlab in my iPad Pro still require the toolbox. What have I been missing?I have bought the license of Database Toolbox and it wotks fine in Mac. When I try to connect with an sqlite .db file in the iPad Pro, I got an error message ‘require Database Toolbox require’.
I contacted Mathworks suppirt, but it was Terasoft Tech Support that responded (I don’t understand why that happened). They suggested me to link my license with my Mathworks user account, but I already did. Mobile Matlab in my iPad Pro still require the toolbox. What have I been missing? I have bought the license of Database Toolbox and it wotks fine in Mac. When I try to connect with an sqlite .db file in the iPad Pro, I got an error message ‘require Database Toolbox require’.
I contacted Mathworks suppirt, but it was Terasoft Tech Support that responded (I don’t understand why that happened). They suggested me to link my license with my Mathworks user account, but I already did. Mobile Matlab in my iPad Pro still require the toolbox. What have I been missing? database toolbox, mobile matlab, license MATLAB Answers — New Questions
Converting NumericEditFields to TextEditFields in App Designer
Is there an easy way to convert NumericEditField components to TextEditField components in Appdesigner? Unfortunately, "Replace with" does not give that as an option. I have 42 of them that I would like to convert [to TextEditField] so that users can type in executable commands instead of having to type numeric values. As one can imagine, creating "new" TextEditFields" to replace numeric ones would be a nightmare. Thank you in advance [even if the short answer is "no"]…Is there an easy way to convert NumericEditField components to TextEditField components in Appdesigner? Unfortunately, "Replace with" does not give that as an option. I have 42 of them that I would like to convert [to TextEditField] so that users can type in executable commands instead of having to type numeric values. As one can imagine, creating "new" TextEditFields" to replace numeric ones would be a nightmare. Thank you in advance [even if the short answer is "no"]… Is there an easy way to convert NumericEditField components to TextEditField components in Appdesigner? Unfortunately, "Replace with" does not give that as an option. I have 42 of them that I would like to convert [to TextEditField] so that users can type in executable commands instead of having to type numeric values. As one can imagine, creating "new" TextEditFields" to replace numeric ones would be a nightmare. Thank you in advance [even if the short answer is "no"]… numericeditfield to texteditfield, appdesigner MATLAB Answers — New Questions
Generate Equations of Motion of Simscape Model
Hi all,
Are the equations of motion formulated by MATLAB Simscape Multibody available to the users? From what I understand, the equations are generated internally and cannot be extracted by the users. But I want to be sure on this.
I also tried using the C code generation but it numerically integrates the equations and doesn’t give access to the equations directly.
Any comments are appreciated. Thanks!Hi all,
Are the equations of motion formulated by MATLAB Simscape Multibody available to the users? From what I understand, the equations are generated internally and cannot be extracted by the users. But I want to be sure on this.
I also tried using the C code generation but it numerically integrates the equations and doesn’t give access to the equations directly.
Any comments are appreciated. Thanks! Hi all,
Are the equations of motion formulated by MATLAB Simscape Multibody available to the users? From what I understand, the equations are generated internally and cannot be extracted by the users. But I want to be sure on this.
I also tried using the C code generation but it numerically integrates the equations and doesn’t give access to the equations directly.
Any comments are appreciated. Thanks! simscape, differential equations, equations of motion, code generation MATLAB Answers — New Questions
Contour Plot Issue – Is the data shown correctly?
Code does the following: Given 3 mic locations and a source S location, it calculates the intersection points from any location in the x-y plane with a circle centered at the mic locations with radius as the distance between the mic and the source.
The distance between the respective intersection points are calculated and added together. So at the source location, the total distance is approximately zero.
The contour plot is meant to plot the total added distance(‘nt’ in the code) against the X-Y plane. I am not sure if I am plotting it correctly. The contour plot doesn’t seem to change shape with change of the source location and that is not right. I checked at the source location if Z1 = Z2 = Z3 and they do. I am not sure if I am plotting incorrectly.
The code should run smoothly – all the functions I created are at the very end of the code.
clear;clc; %Clearing Variables
%% Creating Data
% defining locations
S = [ 0 40 0 ]; %source location [x y z]
M1 =[10 0 0];% Mic 1 location
M2 = [20 0 0];%Mic 2
M3 =[30 0 0]; %Mic 3
% Plane
a = -50;
b = 50;
x = a:b;
y = (a:b).’;
v = numel(x);
%% Calculations
%distance calculated for x-y plane
r1 = normal(S(1,1),M1(1,1),S(1,2),M1(1,2));
r2 = normal(S(1,1),M2(1,1),S(1,2),M2(1,2));
r3 = normal(S(1,1),M3(1,1),S(1,2),M3(1,2));
% Getting the intersection points
Z1 =intersect2(x,y,M1(1),M1(2),r1);
Z2=intersect2(x,y,M2(1),M2(2),r2);
Z3=intersect2(x,y,M3(1),M3(2),r3);
% Calculating the distance between intersection points
[A,~]= size(Z1);
n1 = zeros(A,1);
n2 = zeros(A,1);
n3 = zeros(A,1);
for i = 1:A
n1(i) = norm(Z2(i)-Z1(i));
n2(i) = norm(Z3(i)-Z2(i));
n3(i) = norm(Z1(i)-Z3(i));
end
%total distance for each set of intersection points
nt = n1 + n2 + n3;
%% PLOTTING
%making circles
%for x-y plane
[xm1,ym1] = circle(M1(1,1),M1(1,2),r1);
[xm2,ym2] = circle(M2(1,1),M2(1,2),r2);
[xm3,ym3] = circle(M3(1,1),M3(1,2),r3);
% % %for the x-y plane
%
[X, Y]= ndgrid(x,x);
ZZ = [X(:) , Y(:)];
X = reshape(ZZ(:,1),[v,v]);
Y = reshape(ZZ(:,2),[v,v]);
Z = reshape(nt,[v,v]);
plot(xm1,ym1,’k’)
hold on
plot(M1(1),M1(2),’ks’)
hold on
plot(xm2,ym2,’r’)
plot(M2(1),M2(2),’rs’)
plot(xm3,ym3,’g’)
plot(M3(1),M3(2),’gs’)
plot(S(1),S(2),’ks’)
contour(X,Y,Z,30,’ShowText’,’off’)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [xunit, yunit] = circle(x,y,r)
hold on
th = 0:pi/50:2*pi;
xunit = r * cos(th) + x;
yunit = r * sin(th) + y;
hold off
end
function d = normal(x1,x2,y1,y2)
d = sqrt((x2-x1).^2+(y2-y1).^2);
end
function [Z] = intersect2(x,y,cx,cy,r)
%calculates the intersection points of a line and a circle
u = numel(x);
Z = zeros(u*u,2);
% x = -a:b;
% y = (-a:b).’;
theta = atan2((y-cy) ,(x-cx));
% chk = r* sin(theta)
Zx = cx + r*cos(theta);
Zy = cy + r*sin(theta);
Z = [Zx(:) Zy(:)];
endCode does the following: Given 3 mic locations and a source S location, it calculates the intersection points from any location in the x-y plane with a circle centered at the mic locations with radius as the distance between the mic and the source.
The distance between the respective intersection points are calculated and added together. So at the source location, the total distance is approximately zero.
The contour plot is meant to plot the total added distance(‘nt’ in the code) against the X-Y plane. I am not sure if I am plotting it correctly. The contour plot doesn’t seem to change shape with change of the source location and that is not right. I checked at the source location if Z1 = Z2 = Z3 and they do. I am not sure if I am plotting incorrectly.
The code should run smoothly – all the functions I created are at the very end of the code.
clear;clc; %Clearing Variables
%% Creating Data
% defining locations
S = [ 0 40 0 ]; %source location [x y z]
M1 =[10 0 0];% Mic 1 location
M2 = [20 0 0];%Mic 2
M3 =[30 0 0]; %Mic 3
% Plane
a = -50;
b = 50;
x = a:b;
y = (a:b).’;
v = numel(x);
%% Calculations
%distance calculated for x-y plane
r1 = normal(S(1,1),M1(1,1),S(1,2),M1(1,2));
r2 = normal(S(1,1),M2(1,1),S(1,2),M2(1,2));
r3 = normal(S(1,1),M3(1,1),S(1,2),M3(1,2));
% Getting the intersection points
Z1 =intersect2(x,y,M1(1),M1(2),r1);
Z2=intersect2(x,y,M2(1),M2(2),r2);
Z3=intersect2(x,y,M3(1),M3(2),r3);
% Calculating the distance between intersection points
[A,~]= size(Z1);
n1 = zeros(A,1);
n2 = zeros(A,1);
n3 = zeros(A,1);
for i = 1:A
n1(i) = norm(Z2(i)-Z1(i));
n2(i) = norm(Z3(i)-Z2(i));
n3(i) = norm(Z1(i)-Z3(i));
end
%total distance for each set of intersection points
nt = n1 + n2 + n3;
%% PLOTTING
%making circles
%for x-y plane
[xm1,ym1] = circle(M1(1,1),M1(1,2),r1);
[xm2,ym2] = circle(M2(1,1),M2(1,2),r2);
[xm3,ym3] = circle(M3(1,1),M3(1,2),r3);
% % %for the x-y plane
%
[X, Y]= ndgrid(x,x);
ZZ = [X(:) , Y(:)];
X = reshape(ZZ(:,1),[v,v]);
Y = reshape(ZZ(:,2),[v,v]);
Z = reshape(nt,[v,v]);
plot(xm1,ym1,’k’)
hold on
plot(M1(1),M1(2),’ks’)
hold on
plot(xm2,ym2,’r’)
plot(M2(1),M2(2),’rs’)
plot(xm3,ym3,’g’)
plot(M3(1),M3(2),’gs’)
plot(S(1),S(2),’ks’)
contour(X,Y,Z,30,’ShowText’,’off’)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [xunit, yunit] = circle(x,y,r)
hold on
th = 0:pi/50:2*pi;
xunit = r * cos(th) + x;
yunit = r * sin(th) + y;
hold off
end
function d = normal(x1,x2,y1,y2)
d = sqrt((x2-x1).^2+(y2-y1).^2);
end
function [Z] = intersect2(x,y,cx,cy,r)
%calculates the intersection points of a line and a circle
u = numel(x);
Z = zeros(u*u,2);
% x = -a:b;
% y = (-a:b).’;
theta = atan2((y-cy) ,(x-cx));
% chk = r* sin(theta)
Zx = cx + r*cos(theta);
Zy = cy + r*sin(theta);
Z = [Zx(:) Zy(:)];
end Code does the following: Given 3 mic locations and a source S location, it calculates the intersection points from any location in the x-y plane with a circle centered at the mic locations with radius as the distance between the mic and the source.
The distance between the respective intersection points are calculated and added together. So at the source location, the total distance is approximately zero.
The contour plot is meant to plot the total added distance(‘nt’ in the code) against the X-Y plane. I am not sure if I am plotting it correctly. The contour plot doesn’t seem to change shape with change of the source location and that is not right. I checked at the source location if Z1 = Z2 = Z3 and they do. I am not sure if I am plotting incorrectly.
The code should run smoothly – all the functions I created are at the very end of the code.
clear;clc; %Clearing Variables
%% Creating Data
% defining locations
S = [ 0 40 0 ]; %source location [x y z]
M1 =[10 0 0];% Mic 1 location
M2 = [20 0 0];%Mic 2
M3 =[30 0 0]; %Mic 3
% Plane
a = -50;
b = 50;
x = a:b;
y = (a:b).’;
v = numel(x);
%% Calculations
%distance calculated for x-y plane
r1 = normal(S(1,1),M1(1,1),S(1,2),M1(1,2));
r2 = normal(S(1,1),M2(1,1),S(1,2),M2(1,2));
r3 = normal(S(1,1),M3(1,1),S(1,2),M3(1,2));
% Getting the intersection points
Z1 =intersect2(x,y,M1(1),M1(2),r1);
Z2=intersect2(x,y,M2(1),M2(2),r2);
Z3=intersect2(x,y,M3(1),M3(2),r3);
% Calculating the distance between intersection points
[A,~]= size(Z1);
n1 = zeros(A,1);
n2 = zeros(A,1);
n3 = zeros(A,1);
for i = 1:A
n1(i) = norm(Z2(i)-Z1(i));
n2(i) = norm(Z3(i)-Z2(i));
n3(i) = norm(Z1(i)-Z3(i));
end
%total distance for each set of intersection points
nt = n1 + n2 + n3;
%% PLOTTING
%making circles
%for x-y plane
[xm1,ym1] = circle(M1(1,1),M1(1,2),r1);
[xm2,ym2] = circle(M2(1,1),M2(1,2),r2);
[xm3,ym3] = circle(M3(1,1),M3(1,2),r3);
% % %for the x-y plane
%
[X, Y]= ndgrid(x,x);
ZZ = [X(:) , Y(:)];
X = reshape(ZZ(:,1),[v,v]);
Y = reshape(ZZ(:,2),[v,v]);
Z = reshape(nt,[v,v]);
plot(xm1,ym1,’k’)
hold on
plot(M1(1),M1(2),’ks’)
hold on
plot(xm2,ym2,’r’)
plot(M2(1),M2(2),’rs’)
plot(xm3,ym3,’g’)
plot(M3(1),M3(2),’gs’)
plot(S(1),S(2),’ks’)
contour(X,Y,Z,30,’ShowText’,’off’)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [xunit, yunit] = circle(x,y,r)
hold on
th = 0:pi/50:2*pi;
xunit = r * cos(th) + x;
yunit = r * sin(th) + y;
hold off
end
function d = normal(x1,x2,y1,y2)
d = sqrt((x2-x1).^2+(y2-y1).^2);
end
function [Z] = intersect2(x,y,cx,cy,r)
%calculates the intersection points of a line and a circle
u = numel(x);
Z = zeros(u*u,2);
% x = -a:b;
% y = (-a:b).’;
theta = atan2((y-cy) ,(x-cx));
% chk = r* sin(theta)
Zx = cx + r*cos(theta);
Zy = cy + r*sin(theta);
Z = [Zx(:) Zy(:)];
end contour, plot, data, time of flight, numerical calculation, matlab MATLAB Answers — New Questions