Month: September 2024
How can I use MATLAB functions to generate a Simscape Model?
I want to generate a Simscape model using a MATLAB script because it will cut down on my work time significantly if I can generate it procedurally. I have been able to generate a Simulink model using commands like ‘add_block’, ‘add_line’, and ‘set_param’, but am having trouble generating a Simscape model the same way. How might I go about generating a Simscape model this way?I want to generate a Simscape model using a MATLAB script because it will cut down on my work time significantly if I can generate it procedurally. I have been able to generate a Simulink model using commands like ‘add_block’, ‘add_line’, and ‘set_param’, but am having trouble generating a Simscape model the same way. How might I go about generating a Simscape model this way? I want to generate a Simscape model using a MATLAB script because it will cut down on my work time significantly if I can generate it procedurally. I have been able to generate a Simulink model using commands like ‘add_block’, ‘add_line’, and ‘set_param’, but am having trouble generating a Simscape model the same way. How might I go about generating a Simscape model this way? programmatic, simscape, electrical, add_line, add_block, set_param MATLAB Answers — New Questions
Why am I unable to fit the data in the curve fitter app using the “Select data” button in MATLAB R2023b on MacOS?
I am trying to fit the data into the curve fitter app. I am unable to select the data using "Select data" button of the curve fitter app for X-coordinate, Y-coordinate and Z-coordinate data.
How can I get the curve fitter app to fit this data using the "Select data" button in MATLAB R2023b on MacOS?I am trying to fit the data into the curve fitter app. I am unable to select the data using "Select data" button of the curve fitter app for X-coordinate, Y-coordinate and Z-coordinate data.
How can I get the curve fitter app to fit this data using the "Select data" button in MATLAB R2023b on MacOS? I am trying to fit the data into the curve fitter app. I am unable to select the data using "Select data" button of the curve fitter app for X-coordinate, Y-coordinate and Z-coordinate data.
How can I get the curve fitter app to fit this data using the "Select data" button in MATLAB R2023b on MacOS? nan, curvefitter, loaddata, selectdata MATLAB Answers — New Questions
Why is there a difference between the elements of arrays created by the colon operator with the same step size?
If I create two arrays as follows and compare them, I get the following:
>> scan_period = 0.12; beam_param = 13;
>> dt = scan_period/beam_param;
>> TIME = 0.2189;
>> T = 0:dt:TIME;
>> legTime=0:dt:scan_period;
>> legTime – T(1:14)
ans =
1.0e-16 *
0 0 0 0 0 0 0 0.1388 0 0 0.1388 0.1388 0 0.1388
Why is there a difference between the elements of both arrays when they were created with the same step size?If I create two arrays as follows and compare them, I get the following:
>> scan_period = 0.12; beam_param = 13;
>> dt = scan_period/beam_param;
>> TIME = 0.2189;
>> T = 0:dt:TIME;
>> legTime=0:dt:scan_period;
>> legTime – T(1:14)
ans =
1.0e-16 *
0 0 0 0 0 0 0 0.1388 0 0 0.1388 0.1388 0 0.1388
Why is there a difference between the elements of both arrays when they were created with the same step size? If I create two arrays as follows and compare them, I get the following:
>> scan_period = 0.12; beam_param = 13;
>> dt = scan_period/beam_param;
>> TIME = 0.2189;
>> T = 0:dt:TIME;
>> legTime=0:dt:scan_period;
>> legTime – T(1:14)
ans =
1.0e-16 *
0 0 0 0 0 0 0 0.1388 0 0 0.1388 0.1388 0 0.1388
Why is there a difference between the elements of both arrays when they were created with the same step size? eps, floating-point, accuracy, colon MATLAB Answers — New Questions
How can I import “Pulse-based” or “Frame-based” data into Simulink models?
I have two models and I would like to feed the output of one model, "SourceModel", to the input of the second model, "DestinationModel".
In "SourceModel", I have a "Linear FM Waveform" block with the "Output Signal Format" set to "Pulses". I break that complex output into the real and imaginary portions, save the real portion into a MAT file called "Model1Out.mat", and then use a "To File" block with the "Save format" as "Array", as shown below:
In my second model, "DestinationModel", I would like to import the data saved in "Model1Out.mat" with a "From File" block, but I keep getting the following error:
"Invalid workspace variable specified as workspace input in ‘DestinationModel/From File’. Time values must be non decreasing".
I have tried loading the variable into the workspace to ensure the time values of the frames (first row of the matrix) are always increasing, and they are. I see the same error when I load the data into the workspace and use a "From Workspace" block. How can I get around this error?I have two models and I would like to feed the output of one model, "SourceModel", to the input of the second model, "DestinationModel".
In "SourceModel", I have a "Linear FM Waveform" block with the "Output Signal Format" set to "Pulses". I break that complex output into the real and imaginary portions, save the real portion into a MAT file called "Model1Out.mat", and then use a "To File" block with the "Save format" as "Array", as shown below:
In my second model, "DestinationModel", I would like to import the data saved in "Model1Out.mat" with a "From File" block, but I keep getting the following error:
"Invalid workspace variable specified as workspace input in ‘DestinationModel/From File’. Time values must be non decreasing".
I have tried loading the variable into the workspace to ensure the time values of the frames (first row of the matrix) are always increasing, and they are. I see the same error when I load the data into the workspace and use a "From Workspace" block. How can I get around this error? I have two models and I would like to feed the output of one model, "SourceModel", to the input of the second model, "DestinationModel".
In "SourceModel", I have a "Linear FM Waveform" block with the "Output Signal Format" set to "Pulses". I break that complex output into the real and imaginary portions, save the real portion into a MAT file called "Model1Out.mat", and then use a "To File" block with the "Save format" as "Array", as shown below:
In my second model, "DestinationModel", I would like to import the data saved in "Model1Out.mat" with a "From File" block, but I keep getting the following error:
"Invalid workspace variable specified as workspace input in ‘DestinationModel/From File’. Time values must be non decreasing".
I have tried loading the variable into the workspace to ensure the time values of the frames (first row of the matrix) are always increasing, and they are. I see the same error when I load the data into the workspace and use a "From Workspace" block. How can I get around this error? frame-based, pulse-based, to, workspace, file, from, linear, fm, waveform MATLAB Answers — New Questions
Site Pages Configure Approval Flow Won’t Open dev tools error: DecodedUrl=@a1)/SyncFlowTemplates?
I have multiple SharePoint online communication sites in my tenant and a customer tenant that I’m trying to set up Page Approvals for the Site Pages Library. When selecting the Power Automate Configure Page Approvals flow the dialog does not open to configure the flow. I have versioning turned on with major and minor versions set. Content approval required is turned on. I have used Edge and Opera browsers to try opening the configure approvals dialog and neither work. I’ve opened the developer tools in both browsers to trace potential issues. When selecting Configure page approvals flow i see the following error in the developer tools. SitePages/_api/web/GetListUsingPath(DecodedUrl=@a1)/SyncFlowTemplates?@a1=%27spocontentapproval%27Request Method:GETStatus
Code:404 Not FoundRemote Address:13.107.138.10:443
I have multiple SharePoint online communication sites in my tenant and a customer tenant that I’m trying to set up Page Approvals for the Site Pages Library. When selecting the Power Automate Configure Page Approvals flow the dialog does not open to configure the flow. I have versioning turned on with major and minor versions set. Content approval required is turned on. I have used Edge and Opera browsers to try opening the configure approvals dialog and neither work. I’ve opened the developer tools in both browsers to trace potential issues. When selecting Configure page approvals flow i see the following error in the developer tools. SitePages/_api/web/GetListUsingPath(DecodedUrl=@a1)/SyncFlowTemplates?@a1=%27spocontentapproval%27Request Method:GETStatusCode:404 Not FoundRemote Address:13.107.138.10:443 Read More
Applying to a permissions template to a Teams associated SharePoint Library
I am looking for a way to apply a template to a Sharepoint library that will create specific subfolders with predetermined user/group permissions for each subfolder.
This would be used to created seperate project libraries, each set up with identical sub-folders and permissions per sub folder.
What is the best method to create this?
I am looking for a way to apply a template to a Sharepoint library that will create specific subfolders with predetermined user/group permissions for each subfolder. This would be used to created seperate project libraries, each set up with identical sub-folders and permissions per sub folder. What is the best method to create this? Read More
для професіоналів. Інтернет-версія Excel захист аркушу та дозвіл на редагування певних клітинок
є файл в форматі Інтернет-версія Excel. в цьому файлі є певні клітинки , які потрібно щоб редагувалися іншими користувачами з доступом до цього файлу.
Дані на цьому файлі захищені від випадкових змін, ніякої інформаційної цінності вони не несуть.
Як захистити файл від випадкових змін та надати доступ до певних клітинок?
хто зможе допомогти – щаститиме 2 тижні))))
є файл в форматі Інтернет-версія Excel. в цьому файлі є певні клітинки , які потрібно щоб редагувалися іншими користувачами з доступом до цього файлу. Дані на цьому файлі захищені від випадкових змін, ніякої інформаційної цінності вони не несуть. Як захистити файл від випадкових змін та надати доступ до певних клітинок? хто зможе допомогти – щаститиме 2 тижні)))) Read More
What is the secret to accelerating adoption and unlocking ROI from Copilot for Microsoft 365?
In today’s fast-paced digital world, the sheer volume of emails and messages can overwhelm even the most organized professional – the typical Microsoft 365 power user receives, on average, upwards of 250 emails daily and juggles 150 chats daily. Many of us are no strangers to the overwhelm that comes with the digital hustle. But imagine if you alone didn’t have to bear the weight of these increasing workloads.
AI has proven to be a game-changer in productivity, augmenting human capability and accelerating everyone’s innate ingenuity. It doesn’t just make it easier to check off items on our to-do lists – it unlocks our creative potential, helping us overcome the drudgery of work to rediscover the joy in work. But like any new tool, it takes practice to master.
Copilot for Microsoft 365 is your AI assistant for work that supercharges productivity and creativity, re-engineers business processes, empowering you to securely transform into an AI-powered organization. Integrated into the apps millions use every day, it combines the power of the most advanced LLM’s with your data in the Microsoft Graph—your documents, presentations, email, files, meetings, chats, and more, plus the web to deliver accurate, relevant, and contextual responses all with natural language. Copilot also inherits your existing Microsoft 365 security, privacy, identity, and compliance policies—so you know it’s enterprise-grade.
Copilot has the potential to redefine the boundaries of what an organization can get done. Yet there is an art and science to successful adoption across an organization. To reap the benefits, you must first understand the process of integrating generative AI capabilities into your business operations and investing in the strategies, skills, and techniques needed to unlock the full value of Copilot.
Embracing the Era of AI: The Generative AI Revolution
Generative AI is a type of artificial intelligence that is trained on enormous amounts of data, enabling it to generate novel content, such as text, images, music, and code, in response to natural language requests.
Businesses can use generative AI to improve almost any process where people use or create information. This technology has the potential to transform business with the goal of automating routine tasks, spurring creativity, and empowering people to focus on high-value work. Scaling the personalization of customer interactions helps employees drive satisfaction and loyalty. It also reveals patterns in vast amounts of data to inform better decision-making.
Businesses and professionals around the world are embracing and leveraging GenAI-powered solutions at an exponential speed. For reference – ChatGPT reached a 100 million user base in just 3 months, an unprecedented milestone in the pace of adoption for any technological revolution.
The Business Imperative: Becoming an AI-powered Organization
Copilot represents a new way of delivering business value, employee engagement, and creativity in your organization. To get the most from these transformational AI capabilities, an investment must be made in the human side of change. Supporting your users in understanding these powerful tools will enable you to get the most from your investment and drive the positive transformation that AI capabilities can deliver.
The secret to Copilot adoption: Building new work habits through skilling
It’s not enough to activate Copilot – your people need guidance on how to build new skills.
Copilot isn’t designed to replace human capabilities – it’s designed to enhance them. Copilot for Microsoft 365 is an AI-powered assistant that’s built to enhance your experience with Microsoft 365 applications, including Word, Excel, PowerPoint, Outlook, and Teams. People engage with Copilot just like they would any other virtual assistant, using their native language to ask questions and make requests.
The difference is Copilot knows how to access and manage your content and data spread across Microsoft 365. Copilot for Microsoft 365 knows how to access information from your inbox. It can make some highly informed recommendations based on email threads and chats. It can quickly generate content based on information and ideas you share. It can perform complex or repetitive tasks with simple commands, among many other use cases. But Copilot isn’t a person. Your work output still requires professional judgment that only you can provide. To realize the full potential of generative AI, it’s important that your people understand how to use this technology to augment their own capabilities.
Realize the value of Copilot and unlock ROI
Build Copilot Product Knowledge & Scope of Usage
To use Copilot for Microsoft 365 effectively, team members must grasp the scope of usage of the solution, its capabilities as well as the origins, integrity, and bounds of the data it leverages to draw insights and suggestions. Copilot analyzes a wealth of organizational content within an organization’s Microsoft 365 tenant, including calendars, emails, chats, documents, meetings, contacts, and more – all from within the secure Microsoft 365 compliance boundary.
Engineer Effective and Impactful Prompts
The experience of crafting a prompt is similar to having a conversation in that you’d use plain but clear language to communicate something while providing the necessary context. While the experience seems simple enough, mastering the art of prompt engineering takes practice. To get the best results, employees need to learn how to structure their prompts – a skill your organization needs to hone over time. You need to drive continuous learning and experimentation and establish best practices to ensure the accuracy and appropriateness of AI-generated content.
Empower Your Employees with the Skills and Confidence to Lead the Era of AI
When deployed correctly, Copilot can transform each team member into a leader who is equipped to handle not just mundane tasks but also complex challenges. Beyond automating repetitive processes, employees can entrust Copilot with bigger responsibilities – ranging from research and analysis to creative ideation. However, to realize the fullest potential of Copilot, you’ll need to alter how employees think about work, adopting the qualities of an adept leader that can be helpful, such as delegation, communication, and analytical thinking.
How to get started?
Experts at NetCom Learning – a leading Microsoft Training Services Partner – have put together a comprehensive learning resource – Copilot for Microsoft 365: The Ultimate Skilling Guide – for business leaders, IT pros, and end users to get started with their skilling and adoption journey with Copilot for Microsoft 365.
It also deep dives into the art and science of prompting, along with expert-recommended best practices, tips, and an extensive curated collection of 300+ Copilot prompts to accelerate end-user adoption across the entire suite of Microsoft 365 apps – including:
Copilot for Microsoft 365Copilot in TeamsCopilot in OutlookCopilot in WordCopilot in ExcelCopilot in PowerPointCopilot in OneNoteCopilot in SharePointCopilot in OneDriveCopilot in LoopCopilot in StreamCopilot in FormsCopilot in PlannerCopilot in Viva EngageCopilot in Whiteboard
Embrace the future of work with your personalized AI assistant – Copilot for Microsoft 365!
In today’s fast-paced digital world, the sheer volume of emails and messages can overwhelm even the most organized professional – the typical Microsoft 365 power user receives, on average, upwards of 250 emails daily and juggles 150 chats daily. Many of us are no strangers to the overwhelm that comes with the digital hustle. But imagine if you alone didn’t have to bear the weight of these increasing workloads. AI has proven to be a game-changer in productivity, augmenting human capability and accelerating everyone’s innate ingenuity. It doesn’t just make it easier to check off items on our to-do lists – it unlocks our creative potential, helping us overcome the drudgery of work to rediscover the joy in work. But like any new tool, it takes practice to master. Copilot for Microsoft 365 is your AI assistant for work that supercharges productivity and creativity, re-engineers business processes, empowering you to securely transform into an AI-powered organization. Integrated into the apps millions use every day, it combines the power of the most advanced LLM’s with your data in the Microsoft Graph—your documents, presentations, email, files, meetings, chats, and more, plus the web to deliver accurate, relevant, and contextual responses all with natural language. Copilot also inherits your existing Microsoft 365 security, privacy, identity, and compliance policies—so you know it’s enterprise-grade. Copilot has the potential to redefine the boundaries of what an organization can get done. Yet there is an art and science to successful adoption across an organization. To reap the benefits, you must first understand the process of integrating generative AI capabilities into your business operations and investing in the strategies, skills, and techniques needed to unlock the full value of Copilot. Embracing the Era of AI: The Generative AI Revolution Generative AI is a type of artificial intelligence that is trained on enormous amounts of data, enabling it to generate novel content, such as text, images, music, and code, in response to natural language requests. Businesses can use generative AI to improve almost any process where people use or create information. This technology has the potential to transform business with the goal of automating routine tasks, spurring creativity, and empowering people to focus on high-value work. Scaling the personalization of customer interactions helps employees drive satisfaction and loyalty. It also reveals patterns in vast amounts of data to inform better decision-making. Businesses and professionals around the world are embracing and leveraging GenAI-powered solutions at an exponential speed. For reference – ChatGPT reached a 100 million user base in just 3 months, an unprecedented milestone in the pace of adoption for any technological revolution. The Business Imperative: Becoming an AI-powered Organization Copilot represents a new way of delivering business value, employee engagement, and creativity in your organization. To get the most from these transformational AI capabilities, an investment must be made in the human side of change. Supporting your users in understanding these powerful tools will enable you to get the most from your investment and drive the positive transformation that AI capabilities can deliver. The secret to Copilot adoption: Building new work habits through skilling It’s not enough to activate Copilot – your people need guidance on how to build new skills. Copilot isn’t designed to replace human capabilities – it’s designed to enhance them. Copilot for Microsoft 365 is an AI-powered assistant that’s built to enhance your experience with Microsoft 365 applications, including Word, Excel, PowerPoint, Outlook, and Teams. People engage with Copilot just like they would any other virtual assistant, using their native language to ask questions and make requests. The difference is Copilot knows how to access and manage your content and data spread across Microsoft 365. Copilot for Microsoft 365 knows how to access information from your inbox. It can make some highly informed recommendations based on email threads and chats. It can quickly generate content based on information and ideas you share. It can perform complex or repetitive tasks with simple commands, among many other use cases. But Copilot isn’t a person. Your work output still requires professional judgment that only you can provide. To realize the full potential of generative AI, it’s important that your people understand how to use this technology to augment their own capabilities. Realize the value of Copilot and unlock ROI Build Copilot Product Knowledge & Scope of UsageTo use Copilot for Microsoft 365 effectively, team members must grasp the scope of usage of the solution, its capabilities as well as the origins, integrity, and bounds of the data it leverages to draw insights and suggestions. Copilot analyzes a wealth of organizational content within an organization’s Microsoft 365 tenant, including calendars, emails, chats, documents, meetings, contacts, and more – all from within the secure Microsoft 365 compliance boundary.Engineer Effective and Impactful PromptsThe experience of crafting a prompt is similar to having a conversation in that you’d use plain but clear language to communicate something while providing the necessary context. While the experience seems simple enough, mastering the art of prompt engineering takes practice. To get the best results, employees need to learn how to structure their prompts – a skill your organization needs to hone over time. You need to drive continuous learning and experimentation and establish best practices to ensure the accuracy and appropriateness of AI-generated content.Empower Your Employees with the Skills and Confidence to Lead the Era of AIWhen deployed correctly, Copilot can transform each team member into a leader who is equipped to handle not just mundane tasks but also complex challenges. Beyond automating repetitive processes, employees can entrust Copilot with bigger responsibilities – ranging from research and analysis to creative ideation. However, to realize the fullest potential of Copilot, you’ll need to alter how employees think about work, adopting the qualities of an adept leader that can be helpful, such as delegation, communication, and analytical thinking. How to get started? Experts at NetCom Learning – a leading Microsoft Training Services Partner – have put together a comprehensive learning resource – Copilot for Microsoft 365: The Ultimate Skilling Guide – for business leaders, IT pros, and end users to get started with their skilling and adoption journey with Copilot for Microsoft 365. It also deep dives into the art and science of prompting, along with expert-recommended best practices, tips, and an extensive curated collection of 300+ Copilot prompts to accelerate end-user adoption across the entire suite of Microsoft 365 apps – including:Copilot for Microsoft 365Copilot in TeamsCopilot in OutlookCopilot in WordCopilot in ExcelCopilot in PowerPointCopilot in OneNoteCopilot in SharePointCopilot in OneDriveCopilot in LoopCopilot in StreamCopilot in FormsCopilot in PlannerCopilot in Viva EngageCopilot in WhiteboardEmbrace the future of work with your personalized AI assistant – Copilot for Microsoft 365! Read More
Microsoft Safety scanner looping
Hey Microsoft !
Your Safety scanner recursively scans directories without testing them if they are symbolic links in jar files! It is stuck in a loop ! Should not be. As this, it is unusable. Please fix it ! ( and no, my laptop doesn’t have 18 million files )
The looping problem seems to be related to jar files inspection. For instance, Webstormpluginsvcs-gitlibvcs-git.jar makes a loop in safety scanner
Hey Microsoft !Your Safety scanner recursively scans directories without testing them if they are symbolic links in jar files! It is stuck in a loop ! Should not be. As this, it is unusable. Please fix it ! ( and no, my laptop doesn’t have 18 million files )The looping problem seems to be related to jar files inspection. For instance, Webstormpluginsvcs-gitlibvcs-git.jar makes a loop in safety scanner Read More
Help with creating new list off another list
Trying to pull the Delivery # for all the Customers in the list in Column J
This formula doesnt appear to be working in any fashion, tried a few others and i’m not making any progress.
=UNIQUE(FILTER(‘OB Summary’!B:B,’OB Summary’!L:L=”DONALDSON”))
Trying to pull the Delivery # for all the Customers in the list in Column J This formula doesnt appear to be working in any fashion, tried a few others and i’m not making any progress.=UNIQUE(FILTER(‘OB Summary’!B:B,’OB Summary’!L:L=”DONALDSON”)) Read More
Why do I receive the error “The procedure entry point GetCurrentThreadStackLimits could not be located in the dynamic link library KERNEL32.dll.” when attempting to run the MathWorks Product Installer?
Why do I receive the error "The procedure entry point GetCurrentThreadStackLimits could not be located in the dynamic link library KERNEL32.dll." when attempting to run the MathWorks Product Installer?Why do I receive the error "The procedure entry point GetCurrentThreadStackLimits could not be located in the dynamic link library KERNEL32.dll." when attempting to run the MathWorks Product Installer? Why do I receive the error "The procedure entry point GetCurrentThreadStackLimits could not be located in the dynamic link library KERNEL32.dll." when attempting to run the MathWorks Product Installer? MATLAB Answers — New Questions
Tune SCOM alert
We have been frequently receiving alerts regarding the Mellanox ConnectX-4 Lx Virtual Ethernet Adapter being disabled and re-enabled within a short time span. The alert is triggered each time the adapter is disabled and then enabled, causing unnecessary noise in the system.
Specifically, the current alert triggers too quickly, and I would like to adjust the alert configuration to wait for a longer period before triggering. Ideally, the system should monitor the NIC adapter’s status and only generate an alert if the adapter remains disabled for a longer period of time. If it is re-enabled within the adjusted time frame, the alert should not be triggered.
I have checked the rules and overrides in the System Center Operations Manager (SCOM) but couldn’t find any option to modify the time interval for triggering the alert. Below is a sample of the alert details:
Alert Information:
Mellanox ConnectX-4 Lx Virtual Ethernet Adapter device is successfully stopped.
SCOM Data:
AlertId: b4456b37-5b12-4b56-9e1e-779ec6cccd6c
RuleId: 2f840cdd-71b6-05b4-da8e-9cb1a5b124d4
MonitorName: Microsoft.Windows.Server.10.0.Storage.StorageSpacesDirect.BadBlock
MonitorDisplayName: SCOM S2D: The Device has a Bad Block
Management Pack: Storage Spaces Direct Management Pack:1.0.47.4
MonitoringObjectDisplayName: ABCCCC.Domain.com
MonitoringObjectFullName: Microsoft.Windows.Computer
.Domain.com
We have been frequently receiving alerts regarding the Mellanox ConnectX-4 Lx Virtual Ethernet Adapter being disabled and re-enabled within a short time span. The alert is triggered each time the adapter is disabled and then enabled, causing unnecessary noise in the system.Specifically, the current alert triggers too quickly, and I would like to adjust the alert configuration to wait for a longer period before triggering. Ideally, the system should monitor the NIC adapter’s status and only generate an alert if the adapter remains disabled for a longer period of time. If it is re-enabled within the adjusted time frame, the alert should not be triggered.I have checked the rules and overrides in the System Center Operations Manager (SCOM) but couldn’t find any option to modify the time interval for triggering the alert. Below is a sample of the alert details:Alert Information:Mellanox ConnectX-4 Lx Virtual Ethernet Adapter device is successfully stopped.SCOM Data:AlertId: b4456b37-5b12-4b56-9e1e-779ec6cccd6cRuleId: 2f840cdd-71b6-05b4-da8e-9cb1a5b124d4MonitorName: Microsoft.Windows.Server.10.0.Storage.StorageSpacesDirect.BadBlockMonitorDisplayName: SCOM S2D: The Device has a Bad BlockManagement Pack: Storage Spaces Direct Management Pack:1.0.47.4MonitoringObjectDisplayName: ABCCCC.Domain.comMonitoringObjectFullName: Microsoft.Windows.Computer .Domain.com Read More
Enter Time Into Date/Time Column?
I’m tracking outages of certain systems and need to calculate down to the second, but date/time in SharePoint only allows me to enter Time up to minutes (11:54am for example, instead of 11:54:22am).
Is there anyway I can set up a custom column or something to allow this? Any third-party (free) options to allow this? Sometimes the outages are less than a minute but still need to be tracked (outage might be from 9:35:22am to 9:35:53am for example).
I’m tracking outages of certain systems and need to calculate down to the second, but date/time in SharePoint only allows me to enter Time up to minutes (11:54am for example, instead of 11:54:22am). Is there anyway I can set up a custom column or something to allow this? Any third-party (free) options to allow this? Sometimes the outages are less than a minute but still need to be tracked (outage might be from 9:35:22am to 9:35:53am for example). Read More
Reference/link values in a long string of text >255 characters
Hi, does anyone have any ideas on how I could reference/link values which occur in text >255 characters. e.g below, I would like to link the figures and years quoted below to an input sheet.
The net profit for the year after tax is R999 million for the group and R777 million for the company (2022: R800 million for the group and R600 million for the company). The tax amounts to R99 million for the group and R77 million for the company (2022: R80 million for the group and R60 million for the company).
Hi, does anyone have any ideas on how I could reference/link values which occur in text >255 characters. e.g below, I would like to link the figures and years quoted below to an input sheet. The net profit for the year after tax is R999 million for the group and R777 million for the company (2022: R800 million for the group and R600 million for the company). The tax amounts to R99 million for the group and R77 million for the company (2022: R80 million for the group and R60 million for the company). Read More
Microsoft Defender "XDR" endpoint API Access (Powershell Script)
Hi Everyone,
We are trying to access different part of Microsoft Defender.
More precisely Endpoint after the XDR integration.
We want to be able to get the different Permission Role and Device Group created.
Also, the list of all advanced feature if they are enabled or not.
We want to be able to get information like this
The thing is, we try in a lot of way and could not find documentation about this precise request.
We try with Graph Api and Rest Api.
Always got error 401 (No permission).
Could it be that those API are Private API from Microsoft ?
https://security.microsoft.com/apiproxy/mtp/rbacManagementApi/rbac/user_roles
https://security.microsoft.com/apiproxy/mtp/rbacManagementApi/rbac/machine_groups
https://security.microsoft.com/apiproxy/mtp/settings/GetAdvancedFeaturesSetting
Hi Everyone, We are trying to access different part of Microsoft Defender. More precisely Endpoint after the XDR integration. We want to be able to get the different Permission Role and Device Group created.Also, the list of all advanced feature if they are enabled or not.We want to be able to get information like this The thing is, we try in a lot of way and could not find documentation about this precise request. We try with Graph Api and Rest Api. Always got error 401 (No permission). Could it be that those API are Private API from Microsoft ?https://security.microsoft.com/apiproxy/mtp/rbacManagementApi/rbac/user_roleshttps://security.microsoft.com/apiproxy/mtp/rbacManagementApi/rbac/machine_groupshttps://security.microsoft.com/apiproxy/mtp/settings/GetAdvancedFeaturesSetting Read More
Change file extensions
I have a folder with thousands of files all of which have different extensions. I need to change all the extensions to “jpg” and looked at Rename and replace, but since every extension is different I cannot provide all for the replace function. Sounds weird but the files were produced by a vendors application and all extensions are numeric, “001”, “002”, “003” and on.
Any help would be appreciated.
I have a folder with thousands of files all of which have different extensions. I need to change all the extensions to “jpg” and looked at Rename and replace, but since every extension is different I cannot provide all for the replace function. Sounds weird but the files were produced by a vendors application and all extensions are numeric, “001”, “002”, “003” and on. Any help would be appreciated. Read More
Valid Coin Mask True Pixels Error Outside or Beyond the Actual Mask Error
imread("testCoinImage3.png");
[testcoinMask,MaskedtestCoin] = segmentCoinFace(testCoinImage);
se = strel("disk", 4, 0);
testcoinMask = imfill(testcoinMask, "holes");
testcoinMask = imerode(testcoinMask, se);
imgFilt = imgaussfilt(MaskedtestCoin, 1, ‘Padding’, ‘circular’, ‘FilterDomain’, ‘frequency’, ‘FilterSize’, 3);
faceEdgeMask = edge(imgFilt, "sobel", 0.09, "both");
faceEdgeMask(~testcoinMask) = false;
seFE = strel("disk",75,0);
fEdgeMask = imfill(faceEdgeMask, "holes");
BW2 = imdilate(fEdgeMask,seFE);
validCoinMask = BW2 & testcoinMask;
se2 = strel(‘disk’,75,0);
validcoinMask = imdilate(validCoinMask, se2);
coinProps = regionprops("table", validCoinMask, ‘Area’, ‘Perimeter’);
areas = table2array(coinProps(:, ‘Area’));
range = [min(areas ) max(areas)];
validCoinMask = bwareafilt(validCoinMask, range);
imshow(validCoinMask)
function [BW,maskedImage] = segmentCoinFace(X)
%segmentImage Segment image using auto-generated code from Image Segmenter app
% [BW,MASKEDIMAGE] = segmentImage(X) segments image X using auto-generated
% code from the Image Segmenter app. The final segmentation is returned in
% BW, and a masked image is returned in MASKEDIMAGE.
% Auto-generated by imageSegmenter app on 08-Jul-2023
%—————————————————-
% Adjust data to span data range.
X = imadjust(X);
% Threshold image with global threshold
BW = imbinarize(im2gray(X));
% Open mask with default
radius = 2;
decomposition = 0;
se = strel(‘disk’, radius, decomposition);
BW = imopen(BW, se);testCoinImage = imread("testCoinImage3.png");
[testcoinMask,MaskedtestCoin] = segmentCoin(testCoinImage);
% Shrink the coin mask.
se = strel(‘disk’, 3, 0);
testcoinMask = imfill(testcoinMask, ‘holes’); % Fill any holes in it.
testcoinMask = imerode(testcoinMask, se); % Shrink by 3 layers of pixels.
% Find edges using original poster’s code.
imgFilt = imgaussfilt(MaskedtestCoin,0.7,…
Padding="circular",FilterDomain="frequency",FilterSize=3);
faceEdgeMask = edge(imgFilt,"sobel",0.1,"both");
% Erase outside the shrunken coin mask to get rid of outer boundary.
faceEdgeMask(~testcoinMask) = false;
imshow(faceEdgeMask);
function [BW,maskedImage] = segmentCoin(X)
%segmentImage Segment image using auto-generated code from Image Segmenter app
% [BW,MASKEDIMAGE] = segmentImage(X) segments image X using auto-generated
% code from the Image Segmenter app. The final segmentation is returned in
% BW, and a masked image is returned in MASKEDIMAGE.
% Auto-generated by imageSegmenter app on 08-Jul-2023
%—————————————————-
% Adjust data to span data range.
X = imadjust(X);
% Threshold image with global threshold
BW = imbinarize(im2gray(X));
% Open mask with default
radius = 2;
decomposition = 0;
se = strel(‘disk’, radius, decomposition);
BW = imopen(BW, se);
% Close mask with default
radius = 2;
decomposition = 0;
se = strel(‘disk’, radius, decomposition);
BW = imclose(BW, se);
% Fill holes
BW = imfill(BW, ‘holes’);
% Invert mask
BW = imcomplement(BW);
% Invert mask
BW = imcomplement(BW);
% Create masked image.
maskedImage = X;
maskedImage(~BW) = 0;
end
% Close mask with default
radius = 2;
decomposition = 0;
se = strel(‘disk’, radius, decomposition);
BW = imclose(BW, se);
% Fill holes
BW = imfill(BW, ‘holes’);
% Invert mask
BW = imcomplement(BW);
% Invert mask
BW = imcomplement(BW);
% Create masked image.
maskedImage = X;
maskedImage(~BW) = 0;
end
in the se variable for structuring element , when I change the value to 4 it shows "Your valid coin mask has one or more true pixels outside valid coins," and when I change the se value to another value later on, it would show that it isn’t covering all true valid coins . Please if you can help, I’ve been stuck on this since the past 3 days and I’m getting quite frustrated grrr. Thanks :)imread("testCoinImage3.png");
[testcoinMask,MaskedtestCoin] = segmentCoinFace(testCoinImage);
se = strel("disk", 4, 0);
testcoinMask = imfill(testcoinMask, "holes");
testcoinMask = imerode(testcoinMask, se);
imgFilt = imgaussfilt(MaskedtestCoin, 1, ‘Padding’, ‘circular’, ‘FilterDomain’, ‘frequency’, ‘FilterSize’, 3);
faceEdgeMask = edge(imgFilt, "sobel", 0.09, "both");
faceEdgeMask(~testcoinMask) = false;
seFE = strel("disk",75,0);
fEdgeMask = imfill(faceEdgeMask, "holes");
BW2 = imdilate(fEdgeMask,seFE);
validCoinMask = BW2 & testcoinMask;
se2 = strel(‘disk’,75,0);
validcoinMask = imdilate(validCoinMask, se2);
coinProps = regionprops("table", validCoinMask, ‘Area’, ‘Perimeter’);
areas = table2array(coinProps(:, ‘Area’));
range = [min(areas ) max(areas)];
validCoinMask = bwareafilt(validCoinMask, range);
imshow(validCoinMask)
function [BW,maskedImage] = segmentCoinFace(X)
%segmentImage Segment image using auto-generated code from Image Segmenter app
% [BW,MASKEDIMAGE] = segmentImage(X) segments image X using auto-generated
% code from the Image Segmenter app. The final segmentation is returned in
% BW, and a masked image is returned in MASKEDIMAGE.
% Auto-generated by imageSegmenter app on 08-Jul-2023
%—————————————————-
% Adjust data to span data range.
X = imadjust(X);
% Threshold image with global threshold
BW = imbinarize(im2gray(X));
% Open mask with default
radius = 2;
decomposition = 0;
se = strel(‘disk’, radius, decomposition);
BW = imopen(BW, se);testCoinImage = imread("testCoinImage3.png");
[testcoinMask,MaskedtestCoin] = segmentCoin(testCoinImage);
% Shrink the coin mask.
se = strel(‘disk’, 3, 0);
testcoinMask = imfill(testcoinMask, ‘holes’); % Fill any holes in it.
testcoinMask = imerode(testcoinMask, se); % Shrink by 3 layers of pixels.
% Find edges using original poster’s code.
imgFilt = imgaussfilt(MaskedtestCoin,0.7,…
Padding="circular",FilterDomain="frequency",FilterSize=3);
faceEdgeMask = edge(imgFilt,"sobel",0.1,"both");
% Erase outside the shrunken coin mask to get rid of outer boundary.
faceEdgeMask(~testcoinMask) = false;
imshow(faceEdgeMask);
function [BW,maskedImage] = segmentCoin(X)
%segmentImage Segment image using auto-generated code from Image Segmenter app
% [BW,MASKEDIMAGE] = segmentImage(X) segments image X using auto-generated
% code from the Image Segmenter app. The final segmentation is returned in
% BW, and a masked image is returned in MASKEDIMAGE.
% Auto-generated by imageSegmenter app on 08-Jul-2023
%—————————————————-
% Adjust data to span data range.
X = imadjust(X);
% Threshold image with global threshold
BW = imbinarize(im2gray(X));
% Open mask with default
radius = 2;
decomposition = 0;
se = strel(‘disk’, radius, decomposition);
BW = imopen(BW, se);
% Close mask with default
radius = 2;
decomposition = 0;
se = strel(‘disk’, radius, decomposition);
BW = imclose(BW, se);
% Fill holes
BW = imfill(BW, ‘holes’);
% Invert mask
BW = imcomplement(BW);
% Invert mask
BW = imcomplement(BW);
% Create masked image.
maskedImage = X;
maskedImage(~BW) = 0;
end
% Close mask with default
radius = 2;
decomposition = 0;
se = strel(‘disk’, radius, decomposition);
BW = imclose(BW, se);
% Fill holes
BW = imfill(BW, ‘holes’);
% Invert mask
BW = imcomplement(BW);
% Invert mask
BW = imcomplement(BW);
% Create masked image.
maskedImage = X;
maskedImage(~BW) = 0;
end
in the se variable for structuring element , when I change the value to 4 it shows "Your valid coin mask has one or more true pixels outside valid coins," and when I change the se value to another value later on, it would show that it isn’t covering all true valid coins . Please if you can help, I’ve been stuck on this since the past 3 days and I’m getting quite frustrated grrr. Thanks 🙂 imread("testCoinImage3.png");
[testcoinMask,MaskedtestCoin] = segmentCoinFace(testCoinImage);
se = strel("disk", 4, 0);
testcoinMask = imfill(testcoinMask, "holes");
testcoinMask = imerode(testcoinMask, se);
imgFilt = imgaussfilt(MaskedtestCoin, 1, ‘Padding’, ‘circular’, ‘FilterDomain’, ‘frequency’, ‘FilterSize’, 3);
faceEdgeMask = edge(imgFilt, "sobel", 0.09, "both");
faceEdgeMask(~testcoinMask) = false;
seFE = strel("disk",75,0);
fEdgeMask = imfill(faceEdgeMask, "holes");
BW2 = imdilate(fEdgeMask,seFE);
validCoinMask = BW2 & testcoinMask;
se2 = strel(‘disk’,75,0);
validcoinMask = imdilate(validCoinMask, se2);
coinProps = regionprops("table", validCoinMask, ‘Area’, ‘Perimeter’);
areas = table2array(coinProps(:, ‘Area’));
range = [min(areas ) max(areas)];
validCoinMask = bwareafilt(validCoinMask, range);
imshow(validCoinMask)
function [BW,maskedImage] = segmentCoinFace(X)
%segmentImage Segment image using auto-generated code from Image Segmenter app
% [BW,MASKEDIMAGE] = segmentImage(X) segments image X using auto-generated
% code from the Image Segmenter app. The final segmentation is returned in
% BW, and a masked image is returned in MASKEDIMAGE.
% Auto-generated by imageSegmenter app on 08-Jul-2023
%—————————————————-
% Adjust data to span data range.
X = imadjust(X);
% Threshold image with global threshold
BW = imbinarize(im2gray(X));
% Open mask with default
radius = 2;
decomposition = 0;
se = strel(‘disk’, radius, decomposition);
BW = imopen(BW, se);testCoinImage = imread("testCoinImage3.png");
[testcoinMask,MaskedtestCoin] = segmentCoin(testCoinImage);
% Shrink the coin mask.
se = strel(‘disk’, 3, 0);
testcoinMask = imfill(testcoinMask, ‘holes’); % Fill any holes in it.
testcoinMask = imerode(testcoinMask, se); % Shrink by 3 layers of pixels.
% Find edges using original poster’s code.
imgFilt = imgaussfilt(MaskedtestCoin,0.7,…
Padding="circular",FilterDomain="frequency",FilterSize=3);
faceEdgeMask = edge(imgFilt,"sobel",0.1,"both");
% Erase outside the shrunken coin mask to get rid of outer boundary.
faceEdgeMask(~testcoinMask) = false;
imshow(faceEdgeMask);
function [BW,maskedImage] = segmentCoin(X)
%segmentImage Segment image using auto-generated code from Image Segmenter app
% [BW,MASKEDIMAGE] = segmentImage(X) segments image X using auto-generated
% code from the Image Segmenter app. The final segmentation is returned in
% BW, and a masked image is returned in MASKEDIMAGE.
% Auto-generated by imageSegmenter app on 08-Jul-2023
%—————————————————-
% Adjust data to span data range.
X = imadjust(X);
% Threshold image with global threshold
BW = imbinarize(im2gray(X));
% Open mask with default
radius = 2;
decomposition = 0;
se = strel(‘disk’, radius, decomposition);
BW = imopen(BW, se);
% Close mask with default
radius = 2;
decomposition = 0;
se = strel(‘disk’, radius, decomposition);
BW = imclose(BW, se);
% Fill holes
BW = imfill(BW, ‘holes’);
% Invert mask
BW = imcomplement(BW);
% Invert mask
BW = imcomplement(BW);
% Create masked image.
maskedImage = X;
maskedImage(~BW) = 0;
end
% Close mask with default
radius = 2;
decomposition = 0;
se = strel(‘disk’, radius, decomposition);
BW = imclose(BW, se);
% Fill holes
BW = imfill(BW, ‘holes’);
% Invert mask
BW = imcomplement(BW);
% Invert mask
BW = imcomplement(BW);
% Create masked image.
maskedImage = X;
maskedImage(~BW) = 0;
end
in the se variable for structuring element , when I change the value to 4 it shows "Your valid coin mask has one or more true pixels outside valid coins," and when I change the se value to another value later on, it would show that it isn’t covering all true valid coins . Please if you can help, I’ve been stuck on this since the past 3 days and I’m getting quite frustrated grrr. Thanks 🙂 image segmentation MATLAB Answers — New Questions
Increase temporal granularity in simulink
Hello, I have a simulink model based on the spacecraft dynamics example here:
https://www.mathworks.com/help/aeroblks/analyzing-spacecraft-attitude-profiles-with-satellite-scenario.html#SpacecraftDynamicsCustomAttitudeExample-1
that by default outputs the satellite position at intervals of roughly 10s when not pointing at specific targets (i.e. is in a "point at Nadir" state).
Is it possible to increase the temporal granularity across the whole orbit, in order to have for example a largest time step of 0.5s, even when pointing at Nadir?
Thank youHello, I have a simulink model based on the spacecraft dynamics example here:
https://www.mathworks.com/help/aeroblks/analyzing-spacecraft-attitude-profiles-with-satellite-scenario.html#SpacecraftDynamicsCustomAttitudeExample-1
that by default outputs the satellite position at intervals of roughly 10s when not pointing at specific targets (i.e. is in a "point at Nadir" state).
Is it possible to increase the temporal granularity across the whole orbit, in order to have for example a largest time step of 0.5s, even when pointing at Nadir?
Thank you Hello, I have a simulink model based on the spacecraft dynamics example here:
https://www.mathworks.com/help/aeroblks/analyzing-spacecraft-attitude-profiles-with-satellite-scenario.html#SpacecraftDynamicsCustomAttitudeExample-1
that by default outputs the satellite position at intervals of roughly 10s when not pointing at specific targets (i.e. is in a "point at Nadir" state).
Is it possible to increase the temporal granularity across the whole orbit, in order to have for example a largest time step of 0.5s, even when pointing at Nadir?
Thank you time granularity, satellite simulation MATLAB Answers — New Questions
Very large output numbers
I have a code which gives me the output of a transfer function with giant values, but I know that they can be reduced to get something smaller but I don’t know how, this would be an example of the output:
(6982830709666455*Kc*s)/140737488355328 or (6383029463564235*s^2)/2251799813685248I have a code which gives me the output of a transfer function with giant values, but I know that they can be reduced to get something smaller but I don’t know how, this would be an example of the output:
(6982830709666455*Kc*s)/140737488355328 or (6383029463564235*s^2)/2251799813685248 I have a code which gives me the output of a transfer function with giant values, but I know that they can be reduced to get something smaller but I don’t know how, this would be an example of the output:
(6982830709666455*Kc*s)/140737488355328 or (6383029463564235*s^2)/2251799813685248 solve, simplify, short MATLAB Answers — New Questions
How do I create a timetable from a file that contains several data columns with associated time columns?
I’ve got files which contain data multiple from multiple sensors. Each sensor has it’s own timestamp. Not all sensors have the same number of values.
Currently I’m splitting the file into several timetables. Then I’ll merge and synchronize the timetables and finally fill the missing values.
Is there a better way to do this, since the original files contain several hundred thousand lines for 50-60 signals?
txtArray= {‘Sig1_Time’ ‘Sig1_Value’ ‘Signal2_Time’ ‘Sig2_Value’ ‘Sig3_Time’ ‘Sig3_Value’;
‘4/28/2020 6:41:56.555 PM’ ‘92.1822814’ ‘4/28/2020 6:41:56.545 PM’ ‘21.2642456’ ‘4/28/2020 6:40:56.545 PM’ ‘1.26’;
‘4/28/2020 6:42:06.655 PM’ ‘92.2822814’ ‘4/28/2020 6:42:06.645 PM’ ‘22.3538671’ ‘4/28/2020 6:50:06.645 PM’ ‘2.35’;
‘4/28/2020 6:42:07.665 PM’ ‘92.1922814’ ‘4/28/2020 6:42:07.655 PM’ ‘22.2642456’ ” ”;
” ” ‘4/28/2020 6:42:08.665 PM’ ‘23.2822436’ ” ”;
” ” ‘4/28/2020 6:42:20.786 PM’ ‘22.2642456’ ” ”;
};
% find columns with timestamps
TimeCols = contains([txtArray(1,:)],’Time’,’IgnoreCase’,true);
% convert times to numerical values
times = datetime([txtArray(2:end,TimeCols)],’InputFormat’,’M/d/yyyy h:m:ss.SSS a’);
NoVars = sum(~TimeCols);
for j=1:NoVars
% create time column in TimeTable
TC = times(:,j);
% create data column in TimeTable
DC = cellfun(@(s) str2double(s),txtArray(:,2*j));
% merge arrays into Timetable, remove invalied (NaT) times
TT(j).tt = array2timetable(DC(~isnat(TC)),’RowTimes’,TC(~isnat(TC)));
end
% merge timetables
for j=1:NoVars
if ~issorted(TT(j).tt);
TT(j).tt=sortrows(TT(j).tt);
end
if j>1
if j==2
Ttable = TT(j-1).tt;
end
% synchronize removes dublicate times
Ttable = synchronize(Ttable,TT(j).tt); % https://mathworks.com/help/matlab/ref/timetable.synchronize.html
Ttable = fillmissing(Ttable,’previous’); % https://mathworks.com/help/matlab/ref/fillmissing.html
end
end
% fill missing values for the first lines which may still be empty
Ttable = fillmissing(Ttable,’next’);
% rename properties
Ttable.Properties.VariableNames = {‘Var1′,’Var2′,’Var3’};I’ve got files which contain data multiple from multiple sensors. Each sensor has it’s own timestamp. Not all sensors have the same number of values.
Currently I’m splitting the file into several timetables. Then I’ll merge and synchronize the timetables and finally fill the missing values.
Is there a better way to do this, since the original files contain several hundred thousand lines for 50-60 signals?
txtArray= {‘Sig1_Time’ ‘Sig1_Value’ ‘Signal2_Time’ ‘Sig2_Value’ ‘Sig3_Time’ ‘Sig3_Value’;
‘4/28/2020 6:41:56.555 PM’ ‘92.1822814’ ‘4/28/2020 6:41:56.545 PM’ ‘21.2642456’ ‘4/28/2020 6:40:56.545 PM’ ‘1.26’;
‘4/28/2020 6:42:06.655 PM’ ‘92.2822814’ ‘4/28/2020 6:42:06.645 PM’ ‘22.3538671’ ‘4/28/2020 6:50:06.645 PM’ ‘2.35’;
‘4/28/2020 6:42:07.665 PM’ ‘92.1922814’ ‘4/28/2020 6:42:07.655 PM’ ‘22.2642456’ ” ”;
” ” ‘4/28/2020 6:42:08.665 PM’ ‘23.2822436’ ” ”;
” ” ‘4/28/2020 6:42:20.786 PM’ ‘22.2642456’ ” ”;
};
% find columns with timestamps
TimeCols = contains([txtArray(1,:)],’Time’,’IgnoreCase’,true);
% convert times to numerical values
times = datetime([txtArray(2:end,TimeCols)],’InputFormat’,’M/d/yyyy h:m:ss.SSS a’);
NoVars = sum(~TimeCols);
for j=1:NoVars
% create time column in TimeTable
TC = times(:,j);
% create data column in TimeTable
DC = cellfun(@(s) str2double(s),txtArray(:,2*j));
% merge arrays into Timetable, remove invalied (NaT) times
TT(j).tt = array2timetable(DC(~isnat(TC)),’RowTimes’,TC(~isnat(TC)));
end
% merge timetables
for j=1:NoVars
if ~issorted(TT(j).tt);
TT(j).tt=sortrows(TT(j).tt);
end
if j>1
if j==2
Ttable = TT(j-1).tt;
end
% synchronize removes dublicate times
Ttable = synchronize(Ttable,TT(j).tt); % https://mathworks.com/help/matlab/ref/timetable.synchronize.html
Ttable = fillmissing(Ttable,’previous’); % https://mathworks.com/help/matlab/ref/fillmissing.html
end
end
% fill missing values for the first lines which may still be empty
Ttable = fillmissing(Ttable,’next’);
% rename properties
Ttable.Properties.VariableNames = {‘Var1′,’Var2′,’Var3’}; I’ve got files which contain data multiple from multiple sensors. Each sensor has it’s own timestamp. Not all sensors have the same number of values.
Currently I’m splitting the file into several timetables. Then I’ll merge and synchronize the timetables and finally fill the missing values.
Is there a better way to do this, since the original files contain several hundred thousand lines for 50-60 signals?
txtArray= {‘Sig1_Time’ ‘Sig1_Value’ ‘Signal2_Time’ ‘Sig2_Value’ ‘Sig3_Time’ ‘Sig3_Value’;
‘4/28/2020 6:41:56.555 PM’ ‘92.1822814’ ‘4/28/2020 6:41:56.545 PM’ ‘21.2642456’ ‘4/28/2020 6:40:56.545 PM’ ‘1.26’;
‘4/28/2020 6:42:06.655 PM’ ‘92.2822814’ ‘4/28/2020 6:42:06.645 PM’ ‘22.3538671’ ‘4/28/2020 6:50:06.645 PM’ ‘2.35’;
‘4/28/2020 6:42:07.665 PM’ ‘92.1922814’ ‘4/28/2020 6:42:07.655 PM’ ‘22.2642456’ ” ”;
” ” ‘4/28/2020 6:42:08.665 PM’ ‘23.2822436’ ” ”;
” ” ‘4/28/2020 6:42:20.786 PM’ ‘22.2642456’ ” ”;
};
% find columns with timestamps
TimeCols = contains([txtArray(1,:)],’Time’,’IgnoreCase’,true);
% convert times to numerical values
times = datetime([txtArray(2:end,TimeCols)],’InputFormat’,’M/d/yyyy h:m:ss.SSS a’);
NoVars = sum(~TimeCols);
for j=1:NoVars
% create time column in TimeTable
TC = times(:,j);
% create data column in TimeTable
DC = cellfun(@(s) str2double(s),txtArray(:,2*j));
% merge arrays into Timetable, remove invalied (NaT) times
TT(j).tt = array2timetable(DC(~isnat(TC)),’RowTimes’,TC(~isnat(TC)));
end
% merge timetables
for j=1:NoVars
if ~issorted(TT(j).tt);
TT(j).tt=sortrows(TT(j).tt);
end
if j>1
if j==2
Ttable = TT(j-1).tt;
end
% synchronize removes dublicate times
Ttable = synchronize(Ttable,TT(j).tt); % https://mathworks.com/help/matlab/ref/timetable.synchronize.html
Ttable = fillmissing(Ttable,’previous’); % https://mathworks.com/help/matlab/ref/fillmissing.html
end
end
% fill missing values for the first lines which may still be empty
Ttable = fillmissing(Ttable,’next’);
% rename properties
Ttable.Properties.VariableNames = {‘Var1′,’Var2′,’Var3’}; timetable, data import, array2timetable, multiple time columns MATLAB Answers — New Questions