Category: News
Creationism versus evolution
Why are evolutionists afraid to debate creationists?
Why are evolutionists afraid to debate creationists? Read More
Connect Cisco Meraki devices to Microsoft Sentinel
Hi,
We’re planning to connect Cisco Meraki devices to Microsoft Sentinel. The out of the box data connector ingest logs telemetry through a Syslog.
As per Meraki official documentation
(https://documentation.meraki.com/General_Administration/Monitoring_and_Reporting/Meraki_Device_Reporting_-_Syslog%2C_SNMP%2C_and_API), it seems streaming the logs though API/ Webhooks method is also feasible. Additionally it seems not all the logs can be streamed via syslog as seen below:
Wondering if anyone has tried the Meraki Webhooks or is it not supported in Sentinel? Would be really great to get some feedback in terms of setting it up if its feasible.
thanks
Hi,We’re planning to connect Cisco Meraki devices to Microsoft Sentinel. The out of the box data connector ingest logs telemetry through a Syslog.As per Meraki official documentation(https://documentation.meraki.com/General_Administration/Monitoring_and_Reporting/Meraki_Device_Reporting_-_Syslog%2C_SNMP%2C_and_API), it seems streaming the logs though API/ Webhooks method is also feasible. Additionally it seems not all the logs can be streamed via syslog as seen below:Wondering if anyone has tried the Meraki Webhooks or is it not supported in Sentinel? Would be really great to get some feedback in terms of setting it up if its feasible. thanks Read More
Extending Copilot for Microsoft 365 using TypeScript | Azure Developers JavaScript Day 2024
In this fourth artile around the Microsoft event: the Azure Developers JavaScript Day 2024, Bob German, Principal Cloud Advocate in M365 at Microsoft, showcased the possibilities of extending Copilot within Microsoft 365 using JavaScript and TypeScript.
Copilot is a brand under Microsoft that leverages intelligent chatbots based on OpenAI’s large language models. This technology was unveiled at Microsoft’s Build conference in May 2023 and made available to customers by November 2023 at the Ignite conference.
Let’s dive into the key takeaways from Bob German’s session on extending Copilot for Microsoft 365 using JavaScript and TypeScript.
What was covered during the session?
Let’s break down the key concepts and practical demonstrations shared by Bob German during his session:
Core Concepts and Integration Methods
Microsoft 365 hosts a range of productivity and collaboration applications utilized globally by millions. Copilot, a brand under Microsoft, leverages intelligent chatbots based on these models. German explained two primary methods to extend Copilot’s functionality within Microsoft 365:
Copilot Plugins: These allow Copilot to query additional data through user-created services, enhancing its utility. Plugins can be crafted using JavaScript and TypeScript and are mainly developed as message extension bots, although Power Platform connectors and tools like Copilot Studio offer additional avenues for plugin development.
Graph Connectors: This method involves pushing data into Microsoft 365’s semantic index, allowing Copilot to access and utilize this data as part of its operations.
Practical Demonstrations and Use Cases
During the session, German demonstrated practical implementations of these extensions. He showcased a message extension plugin in Microsoft Teams, where he simplified data retrieval processes during chats. For instance, instead of manually searching for product details, the plugin allowed for instant data display within the chat, fostering more efficient decision-making.
The adaptive cards, a type of interactive content within Microsoft 365, played a importan role in this integration. They enabled actionable insights directly from the chat interface, further streamlining workflows.
Technical Deep Dive
German also provided a deep dive into the technical aspects of creating and deploying these extensions. He illustrated the backend processes involving Azure Bot Framework and how commands within the plugins could be structured to handle complex queries efficiently.
Furthermore, he explained the setup and utilization of Microsoft Graph connectors, emphasizing their role in enhancing Copilot’s capabilities by integrating external data sources directly into Microsoft 365’s ecosystem.
Future Directions
Looking ahead, German highlighted the ongoing developments and potential future enhancements in Copilot’s integration within Microsoft 365. He also pointed towards various resources available to developers, including detailed tutorials and community platforms dedicated to Microsoft 365 development.
Conclusion for the Session
Bob German’s presentation not only illuminated the technical possibilities of extending Microsoft 365’s Copilot but also demonstrated the practical impacts of these extensions on business processes and workflow efficiency.
With tools like JavaScript and TypeScript at their disposal, developers have robust avenues to enhance Copilot’s capabilities, making it a more powerful tool in Microsoft’s productivity suite.
Azure Developers JavaScript Day Cloud Skills Challenge
Don’t forget to participate in the Azure Developers JavaScript Day Cloud Skills Challenge to test your knowledge and share what you’ve learned from the event and mainly include in your LinkedIn profile!
Link to the challenge: JavaScript and Azure Cloud Skills Challenge
Additional Resources
For more information on the topics covered in this article, check out the following resources:
Course – Explore Microsoft Graph scenarios for JavaScript development
Show a user’s emails in a JavaScript app with Microsoft Graph
Access a user’s calendar events in a JavaScript app with Microsoft Graph
Build the Northwind plugin sample
Build the Samples Graph connector
Microsoft 365 Developer Documentation
Microsoft Copilot Studio Overview
Power Platform Developer Documentation
Stay Tuned for More Updates!
Again, don’t forget to check out the Azure Developers JavaScript Day 2024 event for more insights and updates on the latest in JavaScript and Azure development. Stay tuned for more articles and updates from the event!
Microsoft Tech Community – Latest Blogs –Read More
Azure Key Vault Sign API usage
Hello, we are currently working on a solution for PDF signing with the Azure Key Vault Sign API but we are not sure if the we are using the API correctly.
We imported the PKCS12 certificate on Azure Key Vault and we are sending the hashed data base64 encoded in the field value and we are getting the signed data on the response, however, we are not sure about the format of the response value. Do we have to decode or transform the result somehow?
Thank you in advance for the support. BR,
Raphael
Hello, we are currently working on a solution for PDF signing with the Azure Key Vault Sign API but we are not sure if the we are using the API correctly. We imported the PKCS12 certificate on Azure Key Vault and we are sending the hashed data base64 encoded in the field value and we are getting the signed data on the response, however, we are not sure about the format of the response value. Do we have to decode or transform the result somehow? Thank you in advance for the support. BR,Raphael Read More
How to modify the sltrace.Graph objects? I want to delete an element of the DstBlocks array
Hello dear Community,
I would like to delete a block from the DstBlock path. I am using sltrace function and the resulting sltrace.Graph is to be by the user modified. I have read that you have to use "set" and "get" methods because they are property values but I have not been succesful to modify anything. From Matlab help I see that set function can be used like this: set(object, property, value)
I am programming the following line to modify the Trace Path in this case I want to modify the Destination Blocks ( DstBlocks array):
test1 = sltrace(element, ‘Destination’, ‘TraceAll’,’on’);
set(test1.DstBlocks(1), "Value", [ ]);
I am trying here to delete/ modify the value of the first (1) object of the resulting array DstBlock of the resulting Trace Path (test1). What woudl be the correct function to use or the correct sintax if the function set is to be used? Thank you.Hello dear Community,
I would like to delete a block from the DstBlock path. I am using sltrace function and the resulting sltrace.Graph is to be by the user modified. I have read that you have to use "set" and "get" methods because they are property values but I have not been succesful to modify anything. From Matlab help I see that set function can be used like this: set(object, property, value)
I am programming the following line to modify the Trace Path in this case I want to modify the Destination Blocks ( DstBlocks array):
test1 = sltrace(element, ‘Destination’, ‘TraceAll’,’on’);
set(test1.DstBlocks(1), "Value", [ ]);
I am trying here to delete/ modify the value of the first (1) object of the resulting array DstBlock of the resulting Trace Path (test1). What woudl be the correct function to use or the correct sintax if the function set is to be used? Thank you. Hello dear Community,
I would like to delete a block from the DstBlock path. I am using sltrace function and the resulting sltrace.Graph is to be by the user modified. I have read that you have to use "set" and "get" methods because they are property values but I have not been succesful to modify anything. From Matlab help I see that set function can be used like this: set(object, property, value)
I am programming the following line to modify the Trace Path in this case I want to modify the Destination Blocks ( DstBlocks array):
test1 = sltrace(element, ‘Destination’, ‘TraceAll’,’on’);
set(test1.DstBlocks(1), "Value", [ ]);
I am trying here to delete/ modify the value of the first (1) object of the resulting array DstBlock of the resulting Trace Path (test1). What woudl be the correct function to use or the correct sintax if the function set is to be used? Thank you. sltrace, property values, set MATLAB Answers — New Questions
a nonlinear system and its control input in simulink
hi guys the system is as follows ;
which k(a,h) is defined as follows ;
I generally implement its block – daigram in simulink as follows ; I’m not sure whether it’s correct or not ; I need your help on defining the functionshi guys the system is as follows ;
which k(a,h) is defined as follows ;
I generally implement its block – daigram in simulink as follows ; I’m not sure whether it’s correct or not ; I need your help on defining the functions hi guys the system is as follows ;
which k(a,h) is defined as follows ;
I generally implement its block – daigram in simulink as follows ; I’m not sure whether it’s correct or not ; I need your help on defining the functions control MATLAB Answers — New Questions
Principal axis + phase and inclination.
Hello, I would appreciate any assistance in calculating the following variables:
Semi-major axis (Mayor), Semi-minor axis (Minor), Inclination and Phase
of Horizontal velocities u and v are represented as complex numbers complex(u,v) with the purpose of plotting the ellipse as shown in the attached figure.
%horizontal velocity ellipse rotating clockwise.Hello, I would appreciate any assistance in calculating the following variables:
Semi-major axis (Mayor), Semi-minor axis (Minor), Inclination and Phase
of Horizontal velocities u and v are represented as complex numbers complex(u,v) with the purpose of plotting the ellipse as shown in the attached figure.
%horizontal velocity ellipse rotating clockwise. Hello, I would appreciate any assistance in calculating the following variables:
Semi-major axis (Mayor), Semi-minor axis (Minor), Inclination and Phase
of Horizontal velocities u and v are represented as complex numbers complex(u,v) with the purpose of plotting the ellipse as shown in the attached figure.
%horizontal velocity ellipse rotating clockwise. matlab MATLAB Answers — New Questions
come salvare un pacchetto (entity in simevents) nel workspace di matlab?
I would like to create a block that receives a flow of packets (simevents entity) and saves all the packets that end up inside it together with the arrival time in the matlab workspace.
Possibly I would like the name of the variable in which the packet flow is saved to be configurable from the block mask in order to facilitate the creation of many of these blocks without going.
I already have a version that uses the ToWorkspace block but it doesn’t allow me to easily configure the name of the variable where packages end up, so I was wondering if there is a better solution.I would like to create a block that receives a flow of packets (simevents entity) and saves all the packets that end up inside it together with the arrival time in the matlab workspace.
Possibly I would like the name of the variable in which the packet flow is saved to be configurable from the block mask in order to facilitate the creation of many of these blocks without going.
I already have a version that uses the ToWorkspace block but it doesn’t allow me to easily configure the name of the variable where packages end up, so I was wondering if there is a better solution. I would like to create a block that receives a flow of packets (simevents entity) and saves all the packets that end up inside it together with the arrival time in the matlab workspace.
Possibly I would like the name of the variable in which the packet flow is saved to be configurable from the block mask in order to facilitate the creation of many of these blocks without going.
I already have a version that uses the ToWorkspace block but it doesn’t allow me to easily configure the name of the variable where packages end up, so I was wondering if there is a better solution. workspace MATLAB Answers — New Questions
SCI-TX doesnt work properly
I want to send the data calculated in my power electronics algorithm to serial port to log the data. Hovewer, I am very confused on how to correctly route the signals to SCI-TX block. Even this simple code wont send any proper data to UART. What am i doing wrong? Should i enable FIFO interrupts ? I even tried changing the Output X-BAR configurations. More interestingly, my original code works in LAUNCHXL-F280025C but not in my project card with the same mcu on it.I want to send the data calculated in my power electronics algorithm to serial port to log the data. Hovewer, I am very confused on how to correctly route the signals to SCI-TX block. Even this simple code wont send any proper data to UART. What am i doing wrong? Should i enable FIFO interrupts ? I even tried changing the Output X-BAR configurations. More interestingly, my original code works in LAUNCHXL-F280025C but not in my project card with the same mcu on it. I want to send the data calculated in my power electronics algorithm to serial port to log the data. Hovewer, I am very confused on how to correctly route the signals to SCI-TX block. Even this simple code wont send any proper data to UART. What am i doing wrong? Should i enable FIFO interrupts ? I even tried changing the Output X-BAR configurations. More interestingly, my original code works in LAUNCHXL-F280025C but not in my project card with the same mcu on it. simulink, serial, code generation MATLAB Answers — New Questions
High Reprojection Error Discrepancy Between Kalibr and MATLAB Camera Calibration on Same Dataset estimateCameraIMUTransform function.
Hello everyone,
I’m encountering a puzzling issue while attempting to calibrate a camera and imu using MATLAB’s camera calibration toolbox. I’m using the same dataset that I successfully used with Kalibr, but I’m observing significantly higher reprojection errors in MATLAB compared to Kalibr.
Despite achieving very low reprojection errors when using the same dataset with Kalibr, I’m puzzled by the discrepancy when running the calibration in MATLAB. The extrinsics error in MATLAB is much higher than expected.
Has anyone else encountered a similar issue? I would greatly appreciate any insights or suggestions on how to address this discrepancy and improve the accuracy of the calibration in MATLAB.
Thank you in advance for your help!Hello everyone,
I’m encountering a puzzling issue while attempting to calibrate a camera and imu using MATLAB’s camera calibration toolbox. I’m using the same dataset that I successfully used with Kalibr, but I’m observing significantly higher reprojection errors in MATLAB compared to Kalibr.
Despite achieving very low reprojection errors when using the same dataset with Kalibr, I’m puzzled by the discrepancy when running the calibration in MATLAB. The extrinsics error in MATLAB is much higher than expected.
Has anyone else encountered a similar issue? I would greatly appreciate any insights or suggestions on how to address this discrepancy and improve the accuracy of the calibration in MATLAB.
Thank you in advance for your help! Hello everyone,
I’m encountering a puzzling issue while attempting to calibrate a camera and imu using MATLAB’s camera calibration toolbox. I’m using the same dataset that I successfully used with Kalibr, but I’m observing significantly higher reprojection errors in MATLAB compared to Kalibr.
Despite achieving very low reprojection errors when using the same dataset with Kalibr, I’m puzzled by the discrepancy when running the calibration in MATLAB. The extrinsics error in MATLAB is much higher than expected.
Has anyone else encountered a similar issue? I would greatly appreciate any insights or suggestions on how to address this discrepancy and improve the accuracy of the calibration in MATLAB.
Thank you in advance for your help! imu, camera, inertial, calibration MATLAB Answers — New Questions
is there any reason for this?
In Matlab
"1" + "1" = "11"
but
‘1’ + ‘1’ = 98
i.e.
char(49) = ‘1’
but
char(49) + char(49) = 98
Is there any reason for this convention?In Matlab
"1" + "1" = "11"
but
‘1’ + ‘1’ = 98
i.e.
char(49) = ‘1’
but
char(49) + char(49) = 98
Is there any reason for this convention? In Matlab
"1" + "1" = "11"
but
‘1’ + ‘1’ = 98
i.e.
char(49) = ‘1’
but
char(49) + char(49) = 98
Is there any reason for this convention? mathematics MATLAB Answers — New Questions
PSD of DWT details coefficnet
Hi,
I am working on a project involves sensor data analysis. I have a data for entire year that is sampled every 15 minutes. I used DWT (db4 up to three levels) to analyze the high-frequency content of the main signal.
After applying PSD on the reconstructed details signal, I can see some patterns between the levels, which I don’t have a good explanations for them. According to the attached figure, level 3 has two cycles, level 2 one cycle, and level one half cycle. Why is that?
Also, as I remember DWT isolate frequency bands per each level, while there are some overlap in frequencies here. Is it due to the filter nature?
I really appreciate if you can give me your thoughts or suggestions.
Thank you in advance.Hi,
I am working on a project involves sensor data analysis. I have a data for entire year that is sampled every 15 minutes. I used DWT (db4 up to three levels) to analyze the high-frequency content of the main signal.
After applying PSD on the reconstructed details signal, I can see some patterns between the levels, which I don’t have a good explanations for them. According to the attached figure, level 3 has two cycles, level 2 one cycle, and level one half cycle. Why is that?
Also, as I remember DWT isolate frequency bands per each level, while there are some overlap in frequencies here. Is it due to the filter nature?
I really appreciate if you can give me your thoughts or suggestions.
Thank you in advance. Hi,
I am working on a project involves sensor data analysis. I have a data for entire year that is sampled every 15 minutes. I used DWT (db4 up to three levels) to analyze the high-frequency content of the main signal.
After applying PSD on the reconstructed details signal, I can see some patterns between the levels, which I don’t have a good explanations for them. According to the attached figure, level 3 has two cycles, level 2 one cycle, and level one half cycle. Why is that?
Also, as I remember DWT isolate frequency bands per each level, while there are some overlap in frequencies here. Is it due to the filter nature?
I really appreciate if you can give me your thoughts or suggestions.
Thank you in advance. dwt, wavelet, frequency_analysis, digital signal processing MATLAB Answers — New Questions
How to sort table more than one variable with specified condition ?
hi guys, can u tell me a different way to sort table by 2 variable columns which more simple than my method?
I want to sort jointTOS by its X and Z from minimum to maximum but X is the priority.
Here the code :
clear;
clc;
H = 5;
L = 15;
Ns = 2;
Nb = 1;
PortalHeight = H;
Bayspan = L;
NumberStory = Ns;
NumberBay = Nb;
% Variable1
h = [0.8,1.00,1.20,1.40,1.6,1.80];
% Variable2
Lss = [2.00,2.40,2.80,3.20,3.60,4.00];
% Variable3
Nss = [2,3,4];
% Definition
Var1HeightofTrussBeam = h;
Var2LengthSpecialSegment = Lss;
Var3NumberSpecialSegment = Nss;
% % Xbase = zeros(1,length(Totalvariant));
% % Zbase = zeros(1,length(Totalvariant));
% % Xcol = zeros(1,length(Totalvariant));
% % Zcol = zeros(1,length(Totalvariant));
% % Xos = zeros(1,length(Totalvariant));
% % Zos = zeros(1,length(Totalvariant));
% % Xss = zeros(1,length(Totalvariant));
% % Zss = zeros(1,length(Totalvariant));
% % X = zeros(1,length(Totalvariant));
% % Z = zeros(1,length(Totalvariant));
% % jointbase = zeros(1,length(Totalvariant));
% % jointcolumn = zeros(1,length(Totalvariant));
% % jointordinarysegment = zeros(1,length(Totalvariant));
% % jointtopordinarysegment = zeros(1,length(Totalvariant));
% % jointbottomordinarysegment = zeros(1,length(Totalvariant));
% % jointspecialsegment = zeros(1,length(Totalvariant));
% % jointtopspecialsegment = zeros(1,length(Totalvariant));
% % jointbottomspecialsegment = zeros(1,length(Totalvariant));
ijk = 0;
for i = 1:numel(h)
for j = 1:numel(Lss)
for k = 1:numel(Nss)
ijk = ijk+1;
Variantmodel{ijk,:} = table(ijk,h(i),Lss(j),Nss(k),’VariableNames’,{‘VariantID’,’Height’,’Length’,’Number’});
%% Cooridinate Point Base(base)
Xbase{ijk,:} = L*(0:NumberBay);
Zbase{ijk,:} = repelem(0,1,length(Xbase{ijk,:}));
%% Column(col)
Xcolumn = L*(0:NumberBay);
Zcolumn = repelem(H*(1:NumberStory),1,length(Xcolumn));
Xbotbeam = L*(0:NumberBay);
Zbotbeam = repelem((H*(1:NumberStory)-h(i)),1,length(Xbotbeam));
% replicate [X] to be the same size as [Z] for plotting:
Xcol{ijk,:} = repmat([Xcolumn,Xbotbeam],1,NumberStory);
Zcol{ijk,:} = [Zcolumn,Zbotbeam];
%% Cooridinate Point Ordinary Segment (os)
% calculate span length of ordinary segment
Los = (L-Lss(j))/2;
Nos = Los/h(i);
Nos = round(Nos);
los = Los/Nos;
totalspan{ijk,:} = los*Nos*2+Lss(j);
if totalspan{ijk,:} == 15.000
checkspan{ijk,:} = "correct span";
else
checkspan{ijk,:} = "span must be 15m";
end
% top and bottom joint of ordinary segment(os)
XTopOrdinarySegment = reshape([los*(1:Nos),(L/2+Lss(j)/2)+los*(0:Nos-1)].’+L*(0:(NumberBay-1)),1,[]);
XBottomOrdinarySegment = XTopOrdinarySegment;
ZTopOrdinarySegment = repelem(H*(1:NumberStory),1,2*Nos*NumberBay);
ZBottomOrdinarySegment = repelem(H*(1:NumberStory)-h(i),1,2*Nos*NumberBay);
% replicate [X] to be the same size as [Z] for plotting:
Xos{ijk,:} = repmat([XTopOrdinarySegment,XBottomOrdinarySegment],1,NumberStory);
Zos{ijk,:} = [ZTopOrdinarySegment,ZBottomOrdinarySegment];
%% Cooridinate Point Special Segment (ss)
% calculate span length of special segment
lss = Lss(j)/Nss(k);
% top and bottom joint of special segment(ss)
XTopSpecialSegment = reshape((lss*(0:Nss(k))+L/2-Lss(j)/2).’+L*(0:(NumberBay-1)),1,[]);
XBottomSpecialSegment = XTopSpecialSegment;
ZTopSpecialSegment = repelem(H*(1:NumberStory),1,length(XTopSpecialSegment));
ZBottomSpecialSegment = repelem(H*(1:NumberStory)-h(i),1,length(XBottomSpecialSegment));
% replicate [X] to be the same size as [Z] for plotting:
Xss{ijk,:} = repmat([XTopSpecialSegment,XBottomSpecialSegment],1,NumberStory);
Zss{ijk,:} = [ZTopSpecialSegment,ZBottomSpecialSegment];
%% Plot Cooridinate Point (X,Z)
X{ijk,:} = [Xbase{ijk,:},Xcol{ijk,:},Xos{ijk,:},Xss{ijk,:}];
Z{ijk,:} = [Zbase{ijk,:},Zcol{ijk,:},Zos{ijk,:},Zss{ijk,:}];
scatter(X{ijk,:},Z{ijk,:},’filled’),grid on
%check angle
tangent = (Lss(j)/Nss(k))/h(i);
anglespecialsegment(ijk) = atand(tangent);
%% Name the Joint
jointbase{ijk} = table((1:numel(Xbase{ijk,:}))’,Xbase{ijk,:}’,Zbase{ijk,:}’,’VariableNames’,{‘ID’,’X’,’Z’});
jointcolumn{ijk} = table((max(jointbase{ijk}.ID)+1:numel(Xcol{ijk,:})+max(jointbase{ijk}.ID))’,Xcol{ijk,:}’,Zcol{ijk,:}’,’VariableNames’,{‘ID’,’X’,’Z’});
jointordinarysegment{ijk} = table((max(jointcolumn{ijk}.ID)+1:numel(Xos{ijk,:})+max(jointcolumn{ijk}.ID))’,Xos{ijk,:}’,Zos{ijk,:}’,’VariableNames’,{‘ID’,’X’,’Z’});
jointtopordinarysegment{ijk} = jointordinarysegment{ijk}(ismember(jointordinarysegment{ijk}.Z,Zcolumn),:);
jointbottomordinarysegment{ijk} = jointordinarysegment{ijk}(ismember(jointordinarysegment{ijk}.Z,Zbotbeam),:);
jointspecialsegment{ijk} = table((max(jointbottomordinarysegment{ijk}.ID)+1:numel(Xss{ijk,:})+max(jointbottomordinarysegment{ijk}.ID))’,Xss{ijk,:}’,Zss{ijk,:}’,’VariableNames’,{‘ID’,’X’,’Z’});
jointtopspecialsegment{ijk} = jointspecialsegment{ijk}(ismember(jointspecialsegment{ijk}.Z,Zcolumn),:);
jointbottomspecialsegment{ijk} = jointspecialsegment{ijk}(ismember(jointspecialsegment{ijk}.Z,Zbotbeam),:);
end
end
end
% Verify Variants Which Passed the Angle Requirement
tablecheck = table((1:numel(anglespecialsegment))’,totalspan,anglespecialsegment’,’VariableNames’,{‘VariantID’,’Total Span’,’Angle’});
VariantIDPassed = tablecheck.VariantID(tablecheck.Angle>=30 & tablecheck.Angle<=60);
jointbase = table((1:numel(jointbase))’,jointbase’,’VariableNames’,{‘VariantID’,’Joint Base’});
jointbase = jointbase(ismember(jointbase.VariantID,VariantIDPassed),:);
jointcolumn = table((1:numel(jointcolumn))’,jointcolumn’,’VariableNames’,{‘VariantID’,’Joint Column’});
jointcolumn = jointcolumn(ismember(jointcolumn.VariantID,VariantIDPassed),:);
jointtopordinarysegment = table((1:numel(jointtopordinarysegment))’,jointtopordinarysegment’,’VariableNames’,{‘VariantID’,’Joint Top Ordinary Segment’});
jointtopordinarysegment = jointtopordinarysegment(ismember(jointtopordinarysegment.VariantID,VariantIDPassed),:);
jointbottomordinarysegment = table((1:numel(jointbottomordinarysegment))’,jointbottomordinarysegment’,’VariableNames’,{‘VariantID’,’Joint Bottom Ordinary Segment’});
jointbottomordinarysegment = jointbottomordinarysegment(ismember(jointbottomordinarysegment.VariantID,VariantIDPassed),:);
jointtopspecialsegment = table((1:numel(jointtopspecialsegment))’,jointtopspecialsegment’,’VariableNames’,{‘VariantID’,’Joint Top Special Segment’});
jointtopspecialsegment = jointtopspecialsegment(ismember(jointtopspecialsegment.VariantID,VariantIDPassed),:);
jointbottomspecialsegment = table((1:numel(jointbottomspecialsegment))’,jointbottomspecialsegment’,’VariableNames’,{‘VariantID’,’Joint Bottom Special Segment’});
jointbottomspecialsegment = jointbottomspecialsegment(ismember(jointbottomspecialsegment.VariantID,VariantIDPassed),:);
%% Name the Frame
% column
for i = 1:height(VariantIDPassed)
jointIcolumn = 0;
jointJcolumn = 0;
jointcolumnnew{i,:} = jointcolumn.("Joint Column"){i}(ismember(jointcolumn.("Joint Column"){i}.Z,Zcolumn),:);
jointcolumnnew{i,:} = vertcat(jointbase.("Joint Base"){i},jointcolumnnew{i});
for j = 1:height(jointcolumnnew{i,1})-2
jointIcolumn(j) = jointcolumnnew{i,1}.ID(j);
jointJcolumn(j) = jointcolumnnew{i,1}.ID(j+2);
end
framecolumn{i,:} = table((1:j)’,jointIcolumn’,jointJcolumn’,’VariableNames’,{‘Frame ID’,’JointI’,’JoinJ’});
end
% top ordinary segment (TOS)
for i = 1:height(VariantIDPassed)
endTOS{i,:} = jointcolumn.("Joint Column"){i}(ismember(jointcolumn.("Joint Column"){i}.Z,Zcolumn),:);
jointTOS{i,:} = vertcat(jointtopordinarysegment.("Joint Top Ordinary Segment"){i},endTOS{i});
jointTOSnew1{i,:} = sortrows(jointTOS{i}(ismember(jointTOS{i}.Z,5),:),2);
jointTOSnew2{i,:} = sortrows(jointTOS{i}(ismember(jointTOS{i}.Z,10),:),2);
jointTOSnew{i,:} = vertcat(jointTOSnew1{i},jointTOSnew2{i});
end
here the resut that i want :
jointTOSnew{1}hi guys, can u tell me a different way to sort table by 2 variable columns which more simple than my method?
I want to sort jointTOS by its X and Z from minimum to maximum but X is the priority.
Here the code :
clear;
clc;
H = 5;
L = 15;
Ns = 2;
Nb = 1;
PortalHeight = H;
Bayspan = L;
NumberStory = Ns;
NumberBay = Nb;
% Variable1
h = [0.8,1.00,1.20,1.40,1.6,1.80];
% Variable2
Lss = [2.00,2.40,2.80,3.20,3.60,4.00];
% Variable3
Nss = [2,3,4];
% Definition
Var1HeightofTrussBeam = h;
Var2LengthSpecialSegment = Lss;
Var3NumberSpecialSegment = Nss;
% % Xbase = zeros(1,length(Totalvariant));
% % Zbase = zeros(1,length(Totalvariant));
% % Xcol = zeros(1,length(Totalvariant));
% % Zcol = zeros(1,length(Totalvariant));
% % Xos = zeros(1,length(Totalvariant));
% % Zos = zeros(1,length(Totalvariant));
% % Xss = zeros(1,length(Totalvariant));
% % Zss = zeros(1,length(Totalvariant));
% % X = zeros(1,length(Totalvariant));
% % Z = zeros(1,length(Totalvariant));
% % jointbase = zeros(1,length(Totalvariant));
% % jointcolumn = zeros(1,length(Totalvariant));
% % jointordinarysegment = zeros(1,length(Totalvariant));
% % jointtopordinarysegment = zeros(1,length(Totalvariant));
% % jointbottomordinarysegment = zeros(1,length(Totalvariant));
% % jointspecialsegment = zeros(1,length(Totalvariant));
% % jointtopspecialsegment = zeros(1,length(Totalvariant));
% % jointbottomspecialsegment = zeros(1,length(Totalvariant));
ijk = 0;
for i = 1:numel(h)
for j = 1:numel(Lss)
for k = 1:numel(Nss)
ijk = ijk+1;
Variantmodel{ijk,:} = table(ijk,h(i),Lss(j),Nss(k),’VariableNames’,{‘VariantID’,’Height’,’Length’,’Number’});
%% Cooridinate Point Base(base)
Xbase{ijk,:} = L*(0:NumberBay);
Zbase{ijk,:} = repelem(0,1,length(Xbase{ijk,:}));
%% Column(col)
Xcolumn = L*(0:NumberBay);
Zcolumn = repelem(H*(1:NumberStory),1,length(Xcolumn));
Xbotbeam = L*(0:NumberBay);
Zbotbeam = repelem((H*(1:NumberStory)-h(i)),1,length(Xbotbeam));
% replicate [X] to be the same size as [Z] for plotting:
Xcol{ijk,:} = repmat([Xcolumn,Xbotbeam],1,NumberStory);
Zcol{ijk,:} = [Zcolumn,Zbotbeam];
%% Cooridinate Point Ordinary Segment (os)
% calculate span length of ordinary segment
Los = (L-Lss(j))/2;
Nos = Los/h(i);
Nos = round(Nos);
los = Los/Nos;
totalspan{ijk,:} = los*Nos*2+Lss(j);
if totalspan{ijk,:} == 15.000
checkspan{ijk,:} = "correct span";
else
checkspan{ijk,:} = "span must be 15m";
end
% top and bottom joint of ordinary segment(os)
XTopOrdinarySegment = reshape([los*(1:Nos),(L/2+Lss(j)/2)+los*(0:Nos-1)].’+L*(0:(NumberBay-1)),1,[]);
XBottomOrdinarySegment = XTopOrdinarySegment;
ZTopOrdinarySegment = repelem(H*(1:NumberStory),1,2*Nos*NumberBay);
ZBottomOrdinarySegment = repelem(H*(1:NumberStory)-h(i),1,2*Nos*NumberBay);
% replicate [X] to be the same size as [Z] for plotting:
Xos{ijk,:} = repmat([XTopOrdinarySegment,XBottomOrdinarySegment],1,NumberStory);
Zos{ijk,:} = [ZTopOrdinarySegment,ZBottomOrdinarySegment];
%% Cooridinate Point Special Segment (ss)
% calculate span length of special segment
lss = Lss(j)/Nss(k);
% top and bottom joint of special segment(ss)
XTopSpecialSegment = reshape((lss*(0:Nss(k))+L/2-Lss(j)/2).’+L*(0:(NumberBay-1)),1,[]);
XBottomSpecialSegment = XTopSpecialSegment;
ZTopSpecialSegment = repelem(H*(1:NumberStory),1,length(XTopSpecialSegment));
ZBottomSpecialSegment = repelem(H*(1:NumberStory)-h(i),1,length(XBottomSpecialSegment));
% replicate [X] to be the same size as [Z] for plotting:
Xss{ijk,:} = repmat([XTopSpecialSegment,XBottomSpecialSegment],1,NumberStory);
Zss{ijk,:} = [ZTopSpecialSegment,ZBottomSpecialSegment];
%% Plot Cooridinate Point (X,Z)
X{ijk,:} = [Xbase{ijk,:},Xcol{ijk,:},Xos{ijk,:},Xss{ijk,:}];
Z{ijk,:} = [Zbase{ijk,:},Zcol{ijk,:},Zos{ijk,:},Zss{ijk,:}];
scatter(X{ijk,:},Z{ijk,:},’filled’),grid on
%check angle
tangent = (Lss(j)/Nss(k))/h(i);
anglespecialsegment(ijk) = atand(tangent);
%% Name the Joint
jointbase{ijk} = table((1:numel(Xbase{ijk,:}))’,Xbase{ijk,:}’,Zbase{ijk,:}’,’VariableNames’,{‘ID’,’X’,’Z’});
jointcolumn{ijk} = table((max(jointbase{ijk}.ID)+1:numel(Xcol{ijk,:})+max(jointbase{ijk}.ID))’,Xcol{ijk,:}’,Zcol{ijk,:}’,’VariableNames’,{‘ID’,’X’,’Z’});
jointordinarysegment{ijk} = table((max(jointcolumn{ijk}.ID)+1:numel(Xos{ijk,:})+max(jointcolumn{ijk}.ID))’,Xos{ijk,:}’,Zos{ijk,:}’,’VariableNames’,{‘ID’,’X’,’Z’});
jointtopordinarysegment{ijk} = jointordinarysegment{ijk}(ismember(jointordinarysegment{ijk}.Z,Zcolumn),:);
jointbottomordinarysegment{ijk} = jointordinarysegment{ijk}(ismember(jointordinarysegment{ijk}.Z,Zbotbeam),:);
jointspecialsegment{ijk} = table((max(jointbottomordinarysegment{ijk}.ID)+1:numel(Xss{ijk,:})+max(jointbottomordinarysegment{ijk}.ID))’,Xss{ijk,:}’,Zss{ijk,:}’,’VariableNames’,{‘ID’,’X’,’Z’});
jointtopspecialsegment{ijk} = jointspecialsegment{ijk}(ismember(jointspecialsegment{ijk}.Z,Zcolumn),:);
jointbottomspecialsegment{ijk} = jointspecialsegment{ijk}(ismember(jointspecialsegment{ijk}.Z,Zbotbeam),:);
end
end
end
% Verify Variants Which Passed the Angle Requirement
tablecheck = table((1:numel(anglespecialsegment))’,totalspan,anglespecialsegment’,’VariableNames’,{‘VariantID’,’Total Span’,’Angle’});
VariantIDPassed = tablecheck.VariantID(tablecheck.Angle>=30 & tablecheck.Angle<=60);
jointbase = table((1:numel(jointbase))’,jointbase’,’VariableNames’,{‘VariantID’,’Joint Base’});
jointbase = jointbase(ismember(jointbase.VariantID,VariantIDPassed),:);
jointcolumn = table((1:numel(jointcolumn))’,jointcolumn’,’VariableNames’,{‘VariantID’,’Joint Column’});
jointcolumn = jointcolumn(ismember(jointcolumn.VariantID,VariantIDPassed),:);
jointtopordinarysegment = table((1:numel(jointtopordinarysegment))’,jointtopordinarysegment’,’VariableNames’,{‘VariantID’,’Joint Top Ordinary Segment’});
jointtopordinarysegment = jointtopordinarysegment(ismember(jointtopordinarysegment.VariantID,VariantIDPassed),:);
jointbottomordinarysegment = table((1:numel(jointbottomordinarysegment))’,jointbottomordinarysegment’,’VariableNames’,{‘VariantID’,’Joint Bottom Ordinary Segment’});
jointbottomordinarysegment = jointbottomordinarysegment(ismember(jointbottomordinarysegment.VariantID,VariantIDPassed),:);
jointtopspecialsegment = table((1:numel(jointtopspecialsegment))’,jointtopspecialsegment’,’VariableNames’,{‘VariantID’,’Joint Top Special Segment’});
jointtopspecialsegment = jointtopspecialsegment(ismember(jointtopspecialsegment.VariantID,VariantIDPassed),:);
jointbottomspecialsegment = table((1:numel(jointbottomspecialsegment))’,jointbottomspecialsegment’,’VariableNames’,{‘VariantID’,’Joint Bottom Special Segment’});
jointbottomspecialsegment = jointbottomspecialsegment(ismember(jointbottomspecialsegment.VariantID,VariantIDPassed),:);
%% Name the Frame
% column
for i = 1:height(VariantIDPassed)
jointIcolumn = 0;
jointJcolumn = 0;
jointcolumnnew{i,:} = jointcolumn.("Joint Column"){i}(ismember(jointcolumn.("Joint Column"){i}.Z,Zcolumn),:);
jointcolumnnew{i,:} = vertcat(jointbase.("Joint Base"){i},jointcolumnnew{i});
for j = 1:height(jointcolumnnew{i,1})-2
jointIcolumn(j) = jointcolumnnew{i,1}.ID(j);
jointJcolumn(j) = jointcolumnnew{i,1}.ID(j+2);
end
framecolumn{i,:} = table((1:j)’,jointIcolumn’,jointJcolumn’,’VariableNames’,{‘Frame ID’,’JointI’,’JoinJ’});
end
% top ordinary segment (TOS)
for i = 1:height(VariantIDPassed)
endTOS{i,:} = jointcolumn.("Joint Column"){i}(ismember(jointcolumn.("Joint Column"){i}.Z,Zcolumn),:);
jointTOS{i,:} = vertcat(jointtopordinarysegment.("Joint Top Ordinary Segment"){i},endTOS{i});
jointTOSnew1{i,:} = sortrows(jointTOS{i}(ismember(jointTOS{i}.Z,5),:),2);
jointTOSnew2{i,:} = sortrows(jointTOS{i}(ismember(jointTOS{i}.Z,10),:),2);
jointTOSnew{i,:} = vertcat(jointTOSnew1{i},jointTOSnew2{i});
end
here the resut that i want :
jointTOSnew{1} hi guys, can u tell me a different way to sort table by 2 variable columns which more simple than my method?
I want to sort jointTOS by its X and Z from minimum to maximum but X is the priority.
Here the code :
clear;
clc;
H = 5;
L = 15;
Ns = 2;
Nb = 1;
PortalHeight = H;
Bayspan = L;
NumberStory = Ns;
NumberBay = Nb;
% Variable1
h = [0.8,1.00,1.20,1.40,1.6,1.80];
% Variable2
Lss = [2.00,2.40,2.80,3.20,3.60,4.00];
% Variable3
Nss = [2,3,4];
% Definition
Var1HeightofTrussBeam = h;
Var2LengthSpecialSegment = Lss;
Var3NumberSpecialSegment = Nss;
% % Xbase = zeros(1,length(Totalvariant));
% % Zbase = zeros(1,length(Totalvariant));
% % Xcol = zeros(1,length(Totalvariant));
% % Zcol = zeros(1,length(Totalvariant));
% % Xos = zeros(1,length(Totalvariant));
% % Zos = zeros(1,length(Totalvariant));
% % Xss = zeros(1,length(Totalvariant));
% % Zss = zeros(1,length(Totalvariant));
% % X = zeros(1,length(Totalvariant));
% % Z = zeros(1,length(Totalvariant));
% % jointbase = zeros(1,length(Totalvariant));
% % jointcolumn = zeros(1,length(Totalvariant));
% % jointordinarysegment = zeros(1,length(Totalvariant));
% % jointtopordinarysegment = zeros(1,length(Totalvariant));
% % jointbottomordinarysegment = zeros(1,length(Totalvariant));
% % jointspecialsegment = zeros(1,length(Totalvariant));
% % jointtopspecialsegment = zeros(1,length(Totalvariant));
% % jointbottomspecialsegment = zeros(1,length(Totalvariant));
ijk = 0;
for i = 1:numel(h)
for j = 1:numel(Lss)
for k = 1:numel(Nss)
ijk = ijk+1;
Variantmodel{ijk,:} = table(ijk,h(i),Lss(j),Nss(k),’VariableNames’,{‘VariantID’,’Height’,’Length’,’Number’});
%% Cooridinate Point Base(base)
Xbase{ijk,:} = L*(0:NumberBay);
Zbase{ijk,:} = repelem(0,1,length(Xbase{ijk,:}));
%% Column(col)
Xcolumn = L*(0:NumberBay);
Zcolumn = repelem(H*(1:NumberStory),1,length(Xcolumn));
Xbotbeam = L*(0:NumberBay);
Zbotbeam = repelem((H*(1:NumberStory)-h(i)),1,length(Xbotbeam));
% replicate [X] to be the same size as [Z] for plotting:
Xcol{ijk,:} = repmat([Xcolumn,Xbotbeam],1,NumberStory);
Zcol{ijk,:} = [Zcolumn,Zbotbeam];
%% Cooridinate Point Ordinary Segment (os)
% calculate span length of ordinary segment
Los = (L-Lss(j))/2;
Nos = Los/h(i);
Nos = round(Nos);
los = Los/Nos;
totalspan{ijk,:} = los*Nos*2+Lss(j);
if totalspan{ijk,:} == 15.000
checkspan{ijk,:} = "correct span";
else
checkspan{ijk,:} = "span must be 15m";
end
% top and bottom joint of ordinary segment(os)
XTopOrdinarySegment = reshape([los*(1:Nos),(L/2+Lss(j)/2)+los*(0:Nos-1)].’+L*(0:(NumberBay-1)),1,[]);
XBottomOrdinarySegment = XTopOrdinarySegment;
ZTopOrdinarySegment = repelem(H*(1:NumberStory),1,2*Nos*NumberBay);
ZBottomOrdinarySegment = repelem(H*(1:NumberStory)-h(i),1,2*Nos*NumberBay);
% replicate [X] to be the same size as [Z] for plotting:
Xos{ijk,:} = repmat([XTopOrdinarySegment,XBottomOrdinarySegment],1,NumberStory);
Zos{ijk,:} = [ZTopOrdinarySegment,ZBottomOrdinarySegment];
%% Cooridinate Point Special Segment (ss)
% calculate span length of special segment
lss = Lss(j)/Nss(k);
% top and bottom joint of special segment(ss)
XTopSpecialSegment = reshape((lss*(0:Nss(k))+L/2-Lss(j)/2).’+L*(0:(NumberBay-1)),1,[]);
XBottomSpecialSegment = XTopSpecialSegment;
ZTopSpecialSegment = repelem(H*(1:NumberStory),1,length(XTopSpecialSegment));
ZBottomSpecialSegment = repelem(H*(1:NumberStory)-h(i),1,length(XBottomSpecialSegment));
% replicate [X] to be the same size as [Z] for plotting:
Xss{ijk,:} = repmat([XTopSpecialSegment,XBottomSpecialSegment],1,NumberStory);
Zss{ijk,:} = [ZTopSpecialSegment,ZBottomSpecialSegment];
%% Plot Cooridinate Point (X,Z)
X{ijk,:} = [Xbase{ijk,:},Xcol{ijk,:},Xos{ijk,:},Xss{ijk,:}];
Z{ijk,:} = [Zbase{ijk,:},Zcol{ijk,:},Zos{ijk,:},Zss{ijk,:}];
scatter(X{ijk,:},Z{ijk,:},’filled’),grid on
%check angle
tangent = (Lss(j)/Nss(k))/h(i);
anglespecialsegment(ijk) = atand(tangent);
%% Name the Joint
jointbase{ijk} = table((1:numel(Xbase{ijk,:}))’,Xbase{ijk,:}’,Zbase{ijk,:}’,’VariableNames’,{‘ID’,’X’,’Z’});
jointcolumn{ijk} = table((max(jointbase{ijk}.ID)+1:numel(Xcol{ijk,:})+max(jointbase{ijk}.ID))’,Xcol{ijk,:}’,Zcol{ijk,:}’,’VariableNames’,{‘ID’,’X’,’Z’});
jointordinarysegment{ijk} = table((max(jointcolumn{ijk}.ID)+1:numel(Xos{ijk,:})+max(jointcolumn{ijk}.ID))’,Xos{ijk,:}’,Zos{ijk,:}’,’VariableNames’,{‘ID’,’X’,’Z’});
jointtopordinarysegment{ijk} = jointordinarysegment{ijk}(ismember(jointordinarysegment{ijk}.Z,Zcolumn),:);
jointbottomordinarysegment{ijk} = jointordinarysegment{ijk}(ismember(jointordinarysegment{ijk}.Z,Zbotbeam),:);
jointspecialsegment{ijk} = table((max(jointbottomordinarysegment{ijk}.ID)+1:numel(Xss{ijk,:})+max(jointbottomordinarysegment{ijk}.ID))’,Xss{ijk,:}’,Zss{ijk,:}’,’VariableNames’,{‘ID’,’X’,’Z’});
jointtopspecialsegment{ijk} = jointspecialsegment{ijk}(ismember(jointspecialsegment{ijk}.Z,Zcolumn),:);
jointbottomspecialsegment{ijk} = jointspecialsegment{ijk}(ismember(jointspecialsegment{ijk}.Z,Zbotbeam),:);
end
end
end
% Verify Variants Which Passed the Angle Requirement
tablecheck = table((1:numel(anglespecialsegment))’,totalspan,anglespecialsegment’,’VariableNames’,{‘VariantID’,’Total Span’,’Angle’});
VariantIDPassed = tablecheck.VariantID(tablecheck.Angle>=30 & tablecheck.Angle<=60);
jointbase = table((1:numel(jointbase))’,jointbase’,’VariableNames’,{‘VariantID’,’Joint Base’});
jointbase = jointbase(ismember(jointbase.VariantID,VariantIDPassed),:);
jointcolumn = table((1:numel(jointcolumn))’,jointcolumn’,’VariableNames’,{‘VariantID’,’Joint Column’});
jointcolumn = jointcolumn(ismember(jointcolumn.VariantID,VariantIDPassed),:);
jointtopordinarysegment = table((1:numel(jointtopordinarysegment))’,jointtopordinarysegment’,’VariableNames’,{‘VariantID’,’Joint Top Ordinary Segment’});
jointtopordinarysegment = jointtopordinarysegment(ismember(jointtopordinarysegment.VariantID,VariantIDPassed),:);
jointbottomordinarysegment = table((1:numel(jointbottomordinarysegment))’,jointbottomordinarysegment’,’VariableNames’,{‘VariantID’,’Joint Bottom Ordinary Segment’});
jointbottomordinarysegment = jointbottomordinarysegment(ismember(jointbottomordinarysegment.VariantID,VariantIDPassed),:);
jointtopspecialsegment = table((1:numel(jointtopspecialsegment))’,jointtopspecialsegment’,’VariableNames’,{‘VariantID’,’Joint Top Special Segment’});
jointtopspecialsegment = jointtopspecialsegment(ismember(jointtopspecialsegment.VariantID,VariantIDPassed),:);
jointbottomspecialsegment = table((1:numel(jointbottomspecialsegment))’,jointbottomspecialsegment’,’VariableNames’,{‘VariantID’,’Joint Bottom Special Segment’});
jointbottomspecialsegment = jointbottomspecialsegment(ismember(jointbottomspecialsegment.VariantID,VariantIDPassed),:);
%% Name the Frame
% column
for i = 1:height(VariantIDPassed)
jointIcolumn = 0;
jointJcolumn = 0;
jointcolumnnew{i,:} = jointcolumn.("Joint Column"){i}(ismember(jointcolumn.("Joint Column"){i}.Z,Zcolumn),:);
jointcolumnnew{i,:} = vertcat(jointbase.("Joint Base"){i},jointcolumnnew{i});
for j = 1:height(jointcolumnnew{i,1})-2
jointIcolumn(j) = jointcolumnnew{i,1}.ID(j);
jointJcolumn(j) = jointcolumnnew{i,1}.ID(j+2);
end
framecolumn{i,:} = table((1:j)’,jointIcolumn’,jointJcolumn’,’VariableNames’,{‘Frame ID’,’JointI’,’JoinJ’});
end
% top ordinary segment (TOS)
for i = 1:height(VariantIDPassed)
endTOS{i,:} = jointcolumn.("Joint Column"){i}(ismember(jointcolumn.("Joint Column"){i}.Z,Zcolumn),:);
jointTOS{i,:} = vertcat(jointtopordinarysegment.("Joint Top Ordinary Segment"){i},endTOS{i});
jointTOSnew1{i,:} = sortrows(jointTOS{i}(ismember(jointTOS{i}.Z,5),:),2);
jointTOSnew2{i,:} = sortrows(jointTOS{i}(ismember(jointTOS{i}.Z,10),:),2);
jointTOSnew{i,:} = vertcat(jointTOSnew1{i},jointTOSnew2{i});
end
here the resut that i want :
jointTOSnew{1} sort MATLAB Answers — New Questions
Plot a 2D matrix using a color plot
I have a 3D matrix where the spans an angle , the spans a value for a radius and the spans a set of times. The value in the entry is a positive number. What I would like to do is to plot, for each , a 2D colored map of the matrix such that in the point of coordinates () it plots a color depending on the value of . In particular if I would like a specific color, say green, while the more approaches 0 I would like another color to be plotted, say blue, and red if becomes larger than 1.I have a 3D matrix where the spans an angle , the spans a value for a radius and the spans a set of times. The value in the entry is a positive number. What I would like to do is to plot, for each , a 2D colored map of the matrix such that in the point of coordinates () it plots a color depending on the value of . In particular if I would like a specific color, say green, while the more approaches 0 I would like another color to be plotted, say blue, and red if becomes larger than 1. I have a 3D matrix where the spans an angle , the spans a value for a radius and the spans a set of times. The value in the entry is a positive number. What I would like to do is to plot, for each , a 2D colored map of the matrix such that in the point of coordinates () it plots a color depending on the value of . In particular if I would like a specific color, say green, while the more approaches 0 I would like another color to be plotted, say blue, and red if becomes larger than 1. colormap, plot, plotting MATLAB Answers — New Questions
Moving VHDX file attached to Failover Cluster “iSCSI Target” role with no downtime?
Good day,
The setup:
I have a Failover Cluster, each member of which is attached to a shared storage of two LUNs – LUN1 and LUN2.
LUN1 hosts a large VHDX file (of several terabytes) assigned to the “iSCSI Target” cluster role. This role, in turn, allows the same (or other) hosts to connect to this VHDX virtual drive by iSCSI and do some intensive reading & writing on it.
The problem:
I need to move the VHDX file from LUN1 to LUN2, while allowing its iSCSI clients working on it. I want to copy all its contents to the new storag, while avoiding situation, when I have to disconnect these clients during the copying operation to avoid changes made by clients being lost after the switchover of the “iSCSI Target” to the new copy.
Possible direction?
Now, Microsoft has a solution called “Virtual Machine Storage Migration” doing exactly what I need:
Throughout most of the move operation, disk reads and writes go to the source virtual hard disk.While reads and writes occur on the source virtual hard disk, the disk contents are copied to the new destination virtual hard disk.After the initial disk copy is complete, disk writes are mirrored to both the source and destination virtual hard disks while outstanding disk changes are replicated.After the source and destination virtual hard disks are completely synchronized, the virtual machine switches over to using the destination virtual hard disk.The source virtual hard disk is deleted.
But unfortunately, as the name says, it’s for virtual disks attached to VMs.
Is there any possibility to use the same technology for VHDs used by “iSCSI Target“?
If not, then it would be real nice to have such a feature.
Good day, The setup:I have a Failover Cluster, each member of which is attached to a shared storage of two LUNs – LUN1 and LUN2.LUN1 hosts a large VHDX file (of several terabytes) assigned to the “iSCSI Target” cluster role. This role, in turn, allows the same (or other) hosts to connect to this VHDX virtual drive by iSCSI and do some intensive reading & writing on it. The problem:I need to move the VHDX file from LUN1 to LUN2, while allowing its iSCSI clients working on it. I want to copy all its contents to the new storag, while avoiding situation, when I have to disconnect these clients during the copying operation to avoid changes made by clients being lost after the switchover of the “iSCSI Target” to the new copy. Possible direction?Now, Microsoft has a solution called “Virtual Machine Storage Migration” doing exactly what I need:Throughout most of the move operation, disk reads and writes go to the source virtual hard disk.While reads and writes occur on the source virtual hard disk, the disk contents are copied to the new destination virtual hard disk.After the initial disk copy is complete, disk writes are mirrored to both the source and destination virtual hard disks while outstanding disk changes are replicated.After the source and destination virtual hard disks are completely synchronized, the virtual machine switches over to using the destination virtual hard disk.The source virtual hard disk is deleted.But unfortunately, as the name says, it’s for virtual disks attached to VMs.Is there any possibility to use the same technology for VHDs used by “iSCSI Target”? If not, then it would be real nice to have such a feature. Read More
lost access to most of my SharePoint data after a domain name changed.
Hello
Please i need your help on this issue.
I attempted to complete a domain name change from lmaplanningxxxx. sharepoint.com to our new name lrmplanningxx .sharepoint.com.
The change has completed but 27 sites have failed and i have lost access to them and get a redirect error.
I can access the the root site on the new URL.
Hello Please i need your help on this issue. I attempted to complete a domain name change from lmaplanningxxxx. sharepoint.com to our new name lrmplanningxx .sharepoint.com. The change has completed but 27 sites have failed and i have lost access to them and get a redirect error. I can access the the root site on the new URL. Read More
Using SIMULINK, develop the models for controlled rectifiers (1, 4, 6 and 12 pulse) and compare THD to find which rectifier will be suitable for MEA.
this is the table for the parameters Three-Phase Source Block Phase-to-phase voltage (Vrms) 254V Frequency 50Hz PLL Block Minimum frequency 50Hz Pulse Generator (Thyristor, 12 pulse) Block Pulse Width (deg) 60 Three-Phase Transformer (Three Windings) Block Nominal power and frequency [1000VA , 50 Hz] Winding 1 parameters [254.04 0 0] Winding 2 parameters [254.04 0 0] Winding 3 parameters [254.04 0 0] is set for below mentioned blocks in rectifier modelling. hence Explain the graphical results you getting from scopes and Displays for all rectifier types and Explain which rectifier will perform better in More Electric Aircraft and Why?this is the table for the parameters Three-Phase Source Block Phase-to-phase voltage (Vrms) 254V Frequency 50Hz PLL Block Minimum frequency 50Hz Pulse Generator (Thyristor, 12 pulse) Block Pulse Width (deg) 60 Three-Phase Transformer (Three Windings) Block Nominal power and frequency [1000VA , 50 Hz] Winding 1 parameters [254.04 0 0] Winding 2 parameters [254.04 0 0] Winding 3 parameters [254.04 0 0] is set for below mentioned blocks in rectifier modelling. hence Explain the graphical results you getting from scopes and Displays for all rectifier types and Explain which rectifier will perform better in More Electric Aircraft and Why? this is the table for the parameters Three-Phase Source Block Phase-to-phase voltage (Vrms) 254V Frequency 50Hz PLL Block Minimum frequency 50Hz Pulse Generator (Thyristor, 12 pulse) Block Pulse Width (deg) 60 Three-Phase Transformer (Three Windings) Block Nominal power and frequency [1000VA , 50 Hz] Winding 1 parameters [254.04 0 0] Winding 2 parameters [254.04 0 0] Winding 3 parameters [254.04 0 0] is set for below mentioned blocks in rectifier modelling. hence Explain the graphical results you getting from scopes and Displays for all rectifier types and Explain which rectifier will perform better in More Electric Aircraft and Why? simulink MATLAB Answers — New Questions
3 External Accountant Licenses in Business Central
Where can I find the 3 Accountant licenses and can I may one an Admin.?
Thank you/
John Peace
Where can I find the 3 Accountant licenses and can I may one an Admin.?Thank you/ John Peace Read More
Simulation of Full-Bridge LLC Resonant Converter
I want to simulate the full-bridge LLC resonant circuit in Simulink, unfortunately, I am a beginner in Simulink , Can anyone model the circuit as follwoed in Simulink and send me simulink model in response, please.
I want a general model in Simulink, please.
I am really stuck with it, please help.
Thanks in advance
<</matlabcentral/answers/uploaded_files/67733/full-bridge_LLC_converter.png>>I want to simulate the full-bridge LLC resonant circuit in Simulink, unfortunately, I am a beginner in Simulink , Can anyone model the circuit as follwoed in Simulink and send me simulink model in response, please.
I want a general model in Simulink, please.
I am really stuck with it, please help.
Thanks in advance
<</matlabcentral/answers/uploaded_files/67733/full-bridge_LLC_converter.png>> I want to simulate the full-bridge LLC resonant circuit in Simulink, unfortunately, I am a beginner in Simulink , Can anyone model the circuit as follwoed in Simulink and send me simulink model in response, please.
I want a general model in Simulink, please.
I am really stuck with it, please help.
Thanks in advance
<</matlabcentral/answers/uploaded_files/67733/full-bridge_LLC_converter.png>> simulation of full-bridge llc resonant converter MATLAB Answers — New Questions
I am getting error:Warning: Failure at t=0.000000e+00. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (7.905050e-323)
This is my code
clc
clear
global datei Temp c0
datei=’input_data.m’;
run(datei);
zspan=[0 V/A_hc];
%intergration of the system
options=odeset(‘RelTol’,1e-12,’AbsTol’,1e-12);%,’NonNegative’,2:7);
for n=1:size(c,1)
switch dataset
case 1
name=[experiment ‘ ‘ num2str(y0_nh3_scr(n,2)) ‘ ppm NH3 ‘ num2str(y0_nh3_scr(n,1)) ‘ vol NO ‘ num2str(y0_nh3_scr(n,5)) ‘% O2’ ];
case 2
name=[experiment ‘ ‘ num2str(y0_nh3_ox(n,2)) ‘ ppm NH3 ‘ num2str(y0_nh3_ox(n,5)) ‘ vol O2’];
case 3
name=[experiment ‘ ‘ num2str(y0_hcho_ox(n,3)) ‘ ppm HCHO ‘ num2str(y0_hcho_ox(n,5)) ‘ vol O2’];
end
results=zeros(length(T),size(c,2)+2);
for m=1:length(T)
c0=c(n,1:4).*T_N./T(m);
c_o2=c0_o2(n).*T_N./T(m);
p_o2=p0_o2(n);
y0=[c0 0];
Temp=T(m);
tic
disp([‘Calculating Step ‘ num2str(m) ‘ of ‘ num2str(length(T))])
[t,y]=ode15s(@massbalance,zspan,y0,options);
toc
results(m,:)=[T(m)-273.15 y(end,:)];
end
end
results(:,2:5)=results(:,2:5).*Vm.*1e6.*(results(:,1)+273.15)./T_N;
switch dataset
case 1
results(:,2:3)=(1-results(:,2:3)./y0_nh3_scr(n,1:2)).*100;
case 2
results(:,3)=(1-results(:,3)./y0_nh3_ox(n,2)).*100;
case 3
results(:,4)=(1-results(:,4)./y0_hcho_ox(n,3)).*100;
end
name=[name ‘ ‘ char(num2str(fix(clock)))];
save(name,’results’,’-double’,’-ascii’)
plot(results(:,1),results(:,2),’b’,results(:,1),results(:,3),’r’,results(:,1),results(:,6),’g’)
xlabel(‘T / ^oC’)
ylabel(‘y / ppm’)
legend(‘NO’,’NH3′,’N2O’)
function dy_dz = massbalance(takt,y)
global datei Temp c0
run(datei)
F=F*Temp/T_N;
u=F/A_hc;
if c0(1)==0
kin=kin_ox;
else
kin=kin_scr;
end
r1=kin(1,1).*exp(-kin(1,2)./R.*(1/Temp-1/kin(1,3))).*y(2).*(1-y(5));
r2=kin(2,1).*exp(-(kin(2,2)-y(5).*kin(2,3))./(R.*Temp)).*y(5);
r3=kin(3,1).*exp(-kin(3,2)./(R.*Temp)).*y(1).*y(5);
r4=kin(4,1).*exp(-kin(4,2)./(R.*Temp)).*y(5);
r5=kin(5,1).*exp(-kin(5,2)./(R.*Temp)).*y(4);
r6=kin(6,1).*exp(-kin(6,2.)/(R.*Temp)).*y(3);
%% mass balances
dy_dz=[1/u*(-r3)
1/u*(-r1+r2)
1/u*(-r6)
1/u*(-r5)
(r1-r2-r3-r4)/(u*gam)];
end
I am not able to figure out where I am making a mistake. I appricate all the help in advance.This is my code
clc
clear
global datei Temp c0
datei=’input_data.m’;
run(datei);
zspan=[0 V/A_hc];
%intergration of the system
options=odeset(‘RelTol’,1e-12,’AbsTol’,1e-12);%,’NonNegative’,2:7);
for n=1:size(c,1)
switch dataset
case 1
name=[experiment ‘ ‘ num2str(y0_nh3_scr(n,2)) ‘ ppm NH3 ‘ num2str(y0_nh3_scr(n,1)) ‘ vol NO ‘ num2str(y0_nh3_scr(n,5)) ‘% O2’ ];
case 2
name=[experiment ‘ ‘ num2str(y0_nh3_ox(n,2)) ‘ ppm NH3 ‘ num2str(y0_nh3_ox(n,5)) ‘ vol O2’];
case 3
name=[experiment ‘ ‘ num2str(y0_hcho_ox(n,3)) ‘ ppm HCHO ‘ num2str(y0_hcho_ox(n,5)) ‘ vol O2’];
end
results=zeros(length(T),size(c,2)+2);
for m=1:length(T)
c0=c(n,1:4).*T_N./T(m);
c_o2=c0_o2(n).*T_N./T(m);
p_o2=p0_o2(n);
y0=[c0 0];
Temp=T(m);
tic
disp([‘Calculating Step ‘ num2str(m) ‘ of ‘ num2str(length(T))])
[t,y]=ode15s(@massbalance,zspan,y0,options);
toc
results(m,:)=[T(m)-273.15 y(end,:)];
end
end
results(:,2:5)=results(:,2:5).*Vm.*1e6.*(results(:,1)+273.15)./T_N;
switch dataset
case 1
results(:,2:3)=(1-results(:,2:3)./y0_nh3_scr(n,1:2)).*100;
case 2
results(:,3)=(1-results(:,3)./y0_nh3_ox(n,2)).*100;
case 3
results(:,4)=(1-results(:,4)./y0_hcho_ox(n,3)).*100;
end
name=[name ‘ ‘ char(num2str(fix(clock)))];
save(name,’results’,’-double’,’-ascii’)
plot(results(:,1),results(:,2),’b’,results(:,1),results(:,3),’r’,results(:,1),results(:,6),’g’)
xlabel(‘T / ^oC’)
ylabel(‘y / ppm’)
legend(‘NO’,’NH3′,’N2O’)
function dy_dz = massbalance(takt,y)
global datei Temp c0
run(datei)
F=F*Temp/T_N;
u=F/A_hc;
if c0(1)==0
kin=kin_ox;
else
kin=kin_scr;
end
r1=kin(1,1).*exp(-kin(1,2)./R.*(1/Temp-1/kin(1,3))).*y(2).*(1-y(5));
r2=kin(2,1).*exp(-(kin(2,2)-y(5).*kin(2,3))./(R.*Temp)).*y(5);
r3=kin(3,1).*exp(-kin(3,2)./(R.*Temp)).*y(1).*y(5);
r4=kin(4,1).*exp(-kin(4,2)./(R.*Temp)).*y(5);
r5=kin(5,1).*exp(-kin(5,2)./(R.*Temp)).*y(4);
r6=kin(6,1).*exp(-kin(6,2.)/(R.*Temp)).*y(3);
%% mass balances
dy_dz=[1/u*(-r3)
1/u*(-r1+r2)
1/u*(-r6)
1/u*(-r5)
(r1-r2-r3-r4)/(u*gam)];
end
I am not able to figure out where I am making a mistake. I appricate all the help in advance. This is my code
clc
clear
global datei Temp c0
datei=’input_data.m’;
run(datei);
zspan=[0 V/A_hc];
%intergration of the system
options=odeset(‘RelTol’,1e-12,’AbsTol’,1e-12);%,’NonNegative’,2:7);
for n=1:size(c,1)
switch dataset
case 1
name=[experiment ‘ ‘ num2str(y0_nh3_scr(n,2)) ‘ ppm NH3 ‘ num2str(y0_nh3_scr(n,1)) ‘ vol NO ‘ num2str(y0_nh3_scr(n,5)) ‘% O2’ ];
case 2
name=[experiment ‘ ‘ num2str(y0_nh3_ox(n,2)) ‘ ppm NH3 ‘ num2str(y0_nh3_ox(n,5)) ‘ vol O2’];
case 3
name=[experiment ‘ ‘ num2str(y0_hcho_ox(n,3)) ‘ ppm HCHO ‘ num2str(y0_hcho_ox(n,5)) ‘ vol O2’];
end
results=zeros(length(T),size(c,2)+2);
for m=1:length(T)
c0=c(n,1:4).*T_N./T(m);
c_o2=c0_o2(n).*T_N./T(m);
p_o2=p0_o2(n);
y0=[c0 0];
Temp=T(m);
tic
disp([‘Calculating Step ‘ num2str(m) ‘ of ‘ num2str(length(T))])
[t,y]=ode15s(@massbalance,zspan,y0,options);
toc
results(m,:)=[T(m)-273.15 y(end,:)];
end
end
results(:,2:5)=results(:,2:5).*Vm.*1e6.*(results(:,1)+273.15)./T_N;
switch dataset
case 1
results(:,2:3)=(1-results(:,2:3)./y0_nh3_scr(n,1:2)).*100;
case 2
results(:,3)=(1-results(:,3)./y0_nh3_ox(n,2)).*100;
case 3
results(:,4)=(1-results(:,4)./y0_hcho_ox(n,3)).*100;
end
name=[name ‘ ‘ char(num2str(fix(clock)))];
save(name,’results’,’-double’,’-ascii’)
plot(results(:,1),results(:,2),’b’,results(:,1),results(:,3),’r’,results(:,1),results(:,6),’g’)
xlabel(‘T / ^oC’)
ylabel(‘y / ppm’)
legend(‘NO’,’NH3′,’N2O’)
function dy_dz = massbalance(takt,y)
global datei Temp c0
run(datei)
F=F*Temp/T_N;
u=F/A_hc;
if c0(1)==0
kin=kin_ox;
else
kin=kin_scr;
end
r1=kin(1,1).*exp(-kin(1,2)./R.*(1/Temp-1/kin(1,3))).*y(2).*(1-y(5));
r2=kin(2,1).*exp(-(kin(2,2)-y(5).*kin(2,3))./(R.*Temp)).*y(5);
r3=kin(3,1).*exp(-kin(3,2)./(R.*Temp)).*y(1).*y(5);
r4=kin(4,1).*exp(-kin(4,2)./(R.*Temp)).*y(5);
r5=kin(5,1).*exp(-kin(5,2)./(R.*Temp)).*y(4);
r6=kin(6,1).*exp(-kin(6,2.)/(R.*Temp)).*y(3);
%% mass balances
dy_dz=[1/u*(-r3)
1/u*(-r1+r2)
1/u*(-r6)
1/u*(-r5)
(r1-r2-r3-r4)/(u*gam)];
end
I am not able to figure out where I am making a mistake. I appricate all the help in advance. ode, function MATLAB Answers — New Questions