Category: News
Need to help escalate concern for focus OD-SPO
For several weeks, both my OneDrive and SharePoint storage reported incorrect values. In mid-to-late June, I deleted both Primary and Secondary recycle bins but the files came magically back twice.
When I finally managed to have someone look at the concern through Quick Assist, I have also deleted the files and they never went away. The MS Support Engineer said they’re doing “advanced diagnostics”. What I remember a day before I had an issue with OneDrive and SharePoint is that Azure or Microsoft 365 had issues. When I transferred files to SharePoint from OneDrive, the storage utilization never changed.
If I had to provide feedback about MS Support, they stood me up for a whole week at one point and, despite stating email in the communication preference because my vocal cords are damaged, they keep calling then email just to tell me they can’t reach me. New agents assigned to the ticket almost never read ticket details. Just 2 people.
Any help from Microsoft to look into this would be appreciated as I have emailed escalation personnel from the BPO but nobody replied since earlier this morning. It’s close to 4PM Eastern now.
FYI Tracking ID 2406220030001049. Ticket has been open since mid-June. FYI @Russell Read
Regards,
m365bizsubs001
MS365 Business Standard Subscriber
For several weeks, both my OneDrive and SharePoint storage reported incorrect values. In mid-to-late June, I deleted both Primary and Secondary recycle bins but the files came magically back twice.When I finally managed to have someone look at the concern through Quick Assist, I have also deleted the files and they never went away. The MS Support Engineer said they’re doing “advanced diagnostics”. What I remember a day before I had an issue with OneDrive and SharePoint is that Azure or Microsoft 365 had issues. When I transferred files to SharePoint from OneDrive, the storage utilization never changed.If I had to provide feedback about MS Support, they stood me up for a whole week at one point and, despite stating email in the communication preference because my vocal cords are damaged, they keep calling then email just to tell me they can’t reach me. New agents assigned to the ticket almost never read ticket details. Just 2 people.Any help from Microsoft to look into this would be appreciated as I have emailed escalation personnel from the BPO but nobody replied since earlier this morning. It’s close to 4PM Eastern now.FYI Tracking ID 2406220030001049. Ticket has been open since mid-June. FYI @Russell Read Regards,m365bizsubs001MS365 Business Standard Subscriber Read More
Inventory Qty Update Formula
I have a workbook with 3 tabs – Inventory Sheet, Mat Log, Cost Tracking.
The cost tracking sheet had the original inventory amount that we need to start with (Column J).
On the Mat Log sheet, when an item is removed or added to inventory, the person will enter the date in column A, the Mat. Code in Column B – and that will populate the name in Column C. Column F is the amount they are taking out (negative number) or putting into inventory (positive number). Here is where the “I need help” comes in. On the inventory sheet, I need the quantity associated the product code to always be updated based on what happens on the Mat Log sheet.
I have a workbook with 3 tabs – Inventory Sheet, Mat Log, Cost Tracking. The cost tracking sheet had the original inventory amount that we need to start with (Column J).On the Mat Log sheet, when an item is removed or added to inventory, the person will enter the date in column A, the Mat. Code in Column B – and that will populate the name in Column C. Column F is the amount they are taking out (negative number) or putting into inventory (positive number). Here is where the “I need help” comes in. On the inventory sheet, I need the quantity associated the product code to always be updated based on what happens on the Mat Log sheet. Read More
Color Code Emails: Use Conditional Formatting or Assign Categories?
Are you unsure which feature to use for color-coding your emails? Should you use conditional formatting or assign categories?
In this blog post, Color Code Emails: Conditional formatting or Categories » TRACCreations4E, I discuss the differences between the two.
Which do you prefer?
Are you unsure which feature to use for color-coding your emails? Should you use conditional formatting or assign categories?
In this blog post, Color Code Emails: Conditional formatting or Categories » TRACCreations4E, I discuss the differences between the two.
Which do you prefer?
Upcoming Task on 2016 (active)
Hi All,
How do I display more than 50 task, I went into Advanced options ad it say I only have 50 lines but it does say something about filters. I need to display like 150 lines for production scheduling.
Thank you,
Tony
Hi All,How do I display more than 50 task, I went into Advanced options ad it say I only have 50 lines but it does say something about filters. I need to display like 150 lines for production scheduling. Thank you,Tony Read More
eye tracked keyboard
for a few days I have been having trouble with the eye tracking keyboard: I start writing a word and when I go to click on the suggested word, the letters I had written plus the complete word appear on the screen.
For example, I write eyed (eyedropper) and when I press the suggested word on the keyboard, eyedeyedropper is written.
The strange thing is on the desktop WhatsApp client, the writing is correct.
What could it be?
Thanks in advance.
for a few days I have been having trouble with the eye tracking keyboard: I start writing a word and when I go to click on the suggested word, the letters I had written plus the complete word appear on the screen.For example, I write eyed (eyedropper) and when I press the suggested word on the keyboard, eyedeyedropper is written.The strange thing is on the desktop WhatsApp client, the writing is correct.What could it be?Thanks in advance. Read More
Error while attempting mesh plot
I was experimenting in the Matlab live script editor and I tried to make a mesh plot of a hilbert spectrum, but instead of the plot I obtained an error:
Warning: Error occurred while executing the listener callback for event POST_REGION defined for class matlab.internal.language.RegionEvaluator:
Error using getByteStreamFromArray
Error during serialization
Error in matlab.internal.editor.figure.SerializedFigureState/serialize
Error in matlab.internal.editor.FigureProxy/createWebFigureSnapshot
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager.saveSnapshot
Error in matlab.internal.editor.FigureManager.snapshotAllFigures
Here is the problematic code:
mesh(seconds(t),f,hs, ‘EdgeColor’, ‘none’, ‘FaceColor’, ‘interp’)
xlabel(‘Time (s)’)
ylabel(‘Frequency (Hz)’)
zlabel(‘Instantaneous Energy’)
Any idea why I am getting this error?I was experimenting in the Matlab live script editor and I tried to make a mesh plot of a hilbert spectrum, but instead of the plot I obtained an error:
Warning: Error occurred while executing the listener callback for event POST_REGION defined for class matlab.internal.language.RegionEvaluator:
Error using getByteStreamFromArray
Error during serialization
Error in matlab.internal.editor.figure.SerializedFigureState/serialize
Error in matlab.internal.editor.FigureProxy/createWebFigureSnapshot
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager.saveSnapshot
Error in matlab.internal.editor.FigureManager.snapshotAllFigures
Here is the problematic code:
mesh(seconds(t),f,hs, ‘EdgeColor’, ‘none’, ‘FaceColor’, ‘interp’)
xlabel(‘Time (s)’)
ylabel(‘Frequency (Hz)’)
zlabel(‘Instantaneous Energy’)
Any idea why I am getting this error? I was experimenting in the Matlab live script editor and I tried to make a mesh plot of a hilbert spectrum, but instead of the plot I obtained an error:
Warning: Error occurred while executing the listener callback for event POST_REGION defined for class matlab.internal.language.RegionEvaluator:
Error using getByteStreamFromArray
Error during serialization
Error in matlab.internal.editor.figure.SerializedFigureState/serialize
Error in matlab.internal.editor.FigureProxy/createWebFigureSnapshot
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager.saveSnapshot
Error in matlab.internal.editor.FigureManager.snapshotAllFigures
Here is the problematic code:
mesh(seconds(t),f,hs, ‘EdgeColor’, ‘none’, ‘FaceColor’, ‘interp’)
xlabel(‘Time (s)’)
ylabel(‘Frequency (Hz)’)
zlabel(‘Instantaneous Energy’)
Any idea why I am getting this error? mesh, error MATLAB Answers — New Questions
Plotting two surface plots in the same figure using two different colormaps
Hello,
I have been trying to plot two surface plots on top of each other in the same figure – one that is semitransparent, and one that is opaque – using two colormaps to display them. Specifically, I would like surface plot 1 to use the ‘turbo’ colormap, and surface plot 2 to use the ‘gray’ colormap and be semitransparent. So far, I have read through a few people with similar problems but their solutions don’t help me (most are requesting only 1 specific color per each map and not an entire colormap). How can I do this? Thanks. I cannot provide code due to proprietary information, so any example code given, I will gladly fit to my own.Hello,
I have been trying to plot two surface plots on top of each other in the same figure – one that is semitransparent, and one that is opaque – using two colormaps to display them. Specifically, I would like surface plot 1 to use the ‘turbo’ colormap, and surface plot 2 to use the ‘gray’ colormap and be semitransparent. So far, I have read through a few people with similar problems but their solutions don’t help me (most are requesting only 1 specific color per each map and not an entire colormap). How can I do this? Thanks. I cannot provide code due to proprietary information, so any example code given, I will gladly fit to my own. Hello,
I have been trying to plot two surface plots on top of each other in the same figure – one that is semitransparent, and one that is opaque – using two colormaps to display them. Specifically, I would like surface plot 1 to use the ‘turbo’ colormap, and surface plot 2 to use the ‘gray’ colormap and be semitransparent. So far, I have read through a few people with similar problems but their solutions don’t help me (most are requesting only 1 specific color per each map and not an entire colormap). How can I do this? Thanks. I cannot provide code due to proprietary information, so any example code given, I will gladly fit to my own. colormap, surf, two surface plots, two colormaps MATLAB Answers — New Questions
I cannot remove Organization from Person Account on MS Teams
Hello, MS Teams members,
I want to remove an old organization on MS Teams from my personal account, but I cannot.
Hello, MS Teams members,I want to remove an old organization on MS Teams from my personal account, but I cannot. Read More
Dynamic array and spilled array – FILTER function behavior
I am attempting to create a dynamic dependent data validation list (using instructions found on the My Online Training YouTube video). A link to the file is found here.
On the Standards Categories TAB, there is a Table (StdCategories) with two columns for Category and Subcategory. The primary data validation list is for the Category values, and the dependent data validation is for the Subcategory values.
Starting in Cell E2, the Categories are populated horizontally using the UNIQUE and TRANSPOSE functions. Starting in Cell E2, the FILTER and SORT functions are used to populate the Subcategory values for each Category. There is some sort of error occurring in every other Column (starting in column F) where the work “None” is used as the error return value. For some reason, the formula is not matching the value in Row 2 with the associated values in the StdCategories table. I’ve verified this using the Evaluate Formula feature. I’ve tried searching for any help on this issue, but I either can’t find it, or I’m not searching with the right terminology.
Is anyone familiar with this odd behavior, or have any suggestions on diagnosing the error?
I am attempting to create a dynamic dependent data validation list (using instructions found on the My Online Training YouTube video). A link to the file is found here. On the Standards Categories TAB, there is a Table (StdCategories) with two columns for Category and Subcategory. The primary data validation list is for the Category values, and the dependent data validation is for the Subcategory values. Starting in Cell E2, the Categories are populated horizontally using the UNIQUE and TRANSPOSE functions. Starting in Cell E2, the FILTER and SORT functions are used to populate the Subcategory values for each Category. There is some sort of error occurring in every other Column (starting in column F) where the work “None” is used as the error return value. For some reason, the formula is not matching the value in Row 2 with the associated values in the StdCategories table. I’ve verified this using the Evaluate Formula feature. I’ve tried searching for any help on this issue, but I either can’t find it, or I’m not searching with the right terminology. Is anyone familiar with this odd behavior, or have any suggestions on diagnosing the error? Read More
need solution during trainning
Hello all, I am new in this community .I need help to solve the below problem. please help me..
statement : You can add a custom function at the end of your script. For data preprocessing, the function should take the data returned from the datastore as input. It should return the transformed data as output.
function dataout = functionName(datain)
% do something with datain
dataout = …
end
Given script :
letterds = datastore("*_M_*.txt");
data = read(letterds);
data = scale(data);
plot(data.X,data.Y)
axis equal
plot(data.Time,data.Y)
ylabel("Vertical position")
xlabel("Time")
Task ; –
Create a function called scale at the end of the script that performs the following operations:
data.Time = (data.Time – data.Time(1))/1000;
data.X = 1.5*data.X;
Because these commands modify the variable data directly, your function should use data as both the input and output variable.
Note that the third line of the script calls the scale function. Your script won’t run until this function has been created.
Also note that local functions must be at the end of a script. This means you will be editing the script sections out of order in this interaction. The section headings show which section of the script to edit in each task.Hello all, I am new in this community .I need help to solve the below problem. please help me..
statement : You can add a custom function at the end of your script. For data preprocessing, the function should take the data returned from the datastore as input. It should return the transformed data as output.
function dataout = functionName(datain)
% do something with datain
dataout = …
end
Given script :
letterds = datastore("*_M_*.txt");
data = read(letterds);
data = scale(data);
plot(data.X,data.Y)
axis equal
plot(data.Time,data.Y)
ylabel("Vertical position")
xlabel("Time")
Task ; –
Create a function called scale at the end of the script that performs the following operations:
data.Time = (data.Time – data.Time(1))/1000;
data.X = 1.5*data.X;
Because these commands modify the variable data directly, your function should use data as both the input and output variable.
Note that the third line of the script calls the scale function. Your script won’t run until this function has been created.
Also note that local functions must be at the end of a script. This means you will be editing the script sections out of order in this interaction. The section headings show which section of the script to edit in each task. Hello all, I am new in this community .I need help to solve the below problem. please help me..
statement : You can add a custom function at the end of your script. For data preprocessing, the function should take the data returned from the datastore as input. It should return the transformed data as output.
function dataout = functionName(datain)
% do something with datain
dataout = …
end
Given script :
letterds = datastore("*_M_*.txt");
data = read(letterds);
data = scale(data);
plot(data.X,data.Y)
axis equal
plot(data.Time,data.Y)
ylabel("Vertical position")
xlabel("Time")
Task ; –
Create a function called scale at the end of the script that performs the following operations:
data.Time = (data.Time – data.Time(1))/1000;
data.X = 1.5*data.X;
Because these commands modify the variable data directly, your function should use data as both the input and output variable.
Note that the third line of the script calls the scale function. Your script won’t run until this function has been created.
Also note that local functions must be at the end of a script. This means you will be editing the script sections out of order in this interaction. The section headings show which section of the script to edit in each task. data transformation MATLAB Answers — New Questions
Reshape nested cell arrays into the a different nested cell array organization
Hello, I have a nested cell array that has been built up such that the first level cell array A is {691×1}; within each cell in A, there is a second level cell array B of {48×1}; lastly within each cell in B there is a third level nested cell array C of {2×1}.
I want to reshape the nested cell array structure such that it is now organized in the order of cell array B {48×1} first; second level cell array C {2×1} and lastly a third level cell array of A {691×1}.
Is there a way to take the original cell array and use a specific function (such as reshape) to get my desired new nested cell array from my current nested cell array?
have: A {691×1} –> B{48×1} –> C{2×1}
want: B{48×1} –> C{2×1} –> A {691×1}
Thanks!Hello, I have a nested cell array that has been built up such that the first level cell array A is {691×1}; within each cell in A, there is a second level cell array B of {48×1}; lastly within each cell in B there is a third level nested cell array C of {2×1}.
I want to reshape the nested cell array structure such that it is now organized in the order of cell array B {48×1} first; second level cell array C {2×1} and lastly a third level cell array of A {691×1}.
Is there a way to take the original cell array and use a specific function (such as reshape) to get my desired new nested cell array from my current nested cell array?
have: A {691×1} –> B{48×1} –> C{2×1}
want: B{48×1} –> C{2×1} –> A {691×1}
Thanks! Hello, I have a nested cell array that has been built up such that the first level cell array A is {691×1}; within each cell in A, there is a second level cell array B of {48×1}; lastly within each cell in B there is a third level nested cell array C of {2×1}.
I want to reshape the nested cell array structure such that it is now organized in the order of cell array B {48×1} first; second level cell array C {2×1} and lastly a third level cell array of A {691×1}.
Is there a way to take the original cell array and use a specific function (such as reshape) to get my desired new nested cell array from my current nested cell array?
have: A {691×1} –> B{48×1} –> C{2×1}
want: B{48×1} –> C{2×1} –> A {691×1}
Thanks! nested cell array, reshape cell array MATLAB Answers — New Questions
Unable to change expired password
I am using Server Next Preview Build 26257. It is a domain controller. I only have the one AD account which I created to do the evaluation. The account password expired today. When I attempt to change it at login, I enter the new password twice as required and hit Enter, but it sends me back and says “The password for this account has expired” with an OK button.
If I try again I get the same result. If I purposely type a mismatch for the new PW it does acknowledge that.
Has anyone else seen this? I can’t think of a workaround.
I am using Server Next Preview Build 26257. It is a domain controller. I only have the one AD account which I created to do the evaluation. The account password expired today. When I attempt to change it at login, I enter the new password twice as required and hit Enter, but it sends me back and says “The password for this account has expired” with an OK button. If I try again I get the same result. If I purposely type a mismatch for the new PW it does acknowledge that. Has anyone else seen this? I can’t think of a workaround. Read More
Explanation of the Microsoft AI Cloud Partner Agreement & Marketplace Publisher Agreement.
We have to clarify two clauses from the agreement:
Microsoft AI Cloud Partner Program Agreement: Section 8 Limitations of Liability (b) it says Privacy and Data Protection, Confidentiality and Publicity and indemnification are carved out of any limitations in paragraph 8.(a).
Can you please confirm our understanding that Microsoft is asking the Company to have the risk of unlimited liability related to these carve-outs ?Microsoft Publisher Agreement: Section 9 (b) has indemnification claims subject to indirect damages and Section 9 (c) have carve-outs for confidentiality, privacy or data protection which we interpret as having the risk of unlimited liability.
Can you please confirm our understanding that Microsoft is asking the Company to have the risk of unlimited liability related to these carve-outs ?
Helllo there, We have to clarify two clauses from the agreement:Microsoft AI Cloud Partner Program Agreement: Section 8 Limitations of Liability (b) it says Privacy and Data Protection, Confidentiality and Publicity and indemnification are carved out of any limitations in paragraph 8.(a). Can you please confirm our understanding that Microsoft is asking the Company to have the risk of unlimited liability related to these carve-outs ?Microsoft Publisher Agreement: Section 9 (b) has indemnification claims subject to indirect damages and Section 9 (c) have carve-outs for confidentiality, privacy or data protection which we interpret as having the risk of unlimited liability. Can you please confirm our understanding that Microsoft is asking the Company to have the risk of unlimited liability related to these carve-outs ? Read More
How to request 10 free M365 licences for NonProfit with a Godaddy M365 account
Hi,
our organization is eligible to M365 offer for non profit, but since we are client to Godaddy M365 , we are automatically redirect to ther logon page when we try to request licences on Microsoft interface.
We have contact Godaddy hoping they will remove those restrictions, in order for us to receive M365 licences, but they told us that if we want to move to microsoft they wil simply delete our instance so allow us to go for Microsoft.
Have someone face that issue? If there are advices, your are welcome.
Sorry for my english
Hi, our organization is eligible to M365 offer for non profit, but since we are client to Godaddy M365 , we are automatically redirect to ther logon page when we try to request licences on Microsoft interface. We have contact Godaddy hoping they will remove those restrictions, in order for us to receive M365 licences, but they told us that if we want to move to microsoft they wil simply delete our instance so allow us to go for Microsoft. Have someone face that issue? If there are advices, your are welcome. Sorry for my english Read More
Can’t Download Files Completely from One Drive
Hi, I tried to download dataset files online for model training, but there is a file where I keep on encountering errors, where the files had 8000+ file inside, but it can’t download completely. The file is around 22.6GB but whenever I tried to download, it is able to download. But even it shows download complete, it is actually not complete. Instead, it shows a txt file showing the error, as shown below. Does anyone knows ways to solve this problem?
Anyone knows how to solve this error?
Hi, I tried to download dataset files online for model training, but there is a file where I keep on encountering errors, where the files had 8000+ file inside, but it can’t download completely. The file is around 22.6GB but whenever I tried to download, it is able to download. But even it shows download complete, it is actually not complete. Instead, it shows a txt file showing the error, as shown below. Does anyone knows ways to solve this problem?Anyone knows how to solve this error? Read More
Copilot Snacks! Copilot for Payers – How Copilot for Sales can be used by Agents and Brokers
Unlocking the Potential of AI in Health Insurance Sales with Copilot for Sales
This discussion offers a glimpse into the future of health insurance sales, where AI-powered tools like Copilot for Sales empower agents to deliver exceptional service while maximizing their productivity. For sales agents and brokers looking to stay ahead in the competitive health insurance market, this video is a must-watch.
Revolutionizing Health Insurance Sales with Copilot for Sales
Integration: Seamlessly connects productivity tools with CRM systems, enhancing data flow and efficiency
Productivity: Offers sales-specific workflows, improving agent efficiency and customer engagement
Personalization: Utilizes AI to tailor customer interactions, summarizing email threads and drafting responses
Competitive Intelligence: Provides real-time competitive insights, aiding agents in offering the best solutions
Efficiency: Streamlines preparation, consolidating information in one place for quicker, more effective meetings
To see all HLS Copilot Snacks video click here.
Special thanks to Ashley Keimach for her expertise and making this video possible
Microsoft Tech Community – Latest Blogs –Read More
Error in reflectarray_gui_v2 (line 42) gui_mainfcn(gui_State, varargin{:});
function varargout = reflectarray_gui_v2(varargin)
% REFLECTARRAY_GUI_V2 MATLAB code for reflectarray_gui_v2.fig
% REFLECTARRAY_GUI_V2, by itself, creates a new REFLECTARRAY_GUI_V2 or raises the existing
% singleton*.
%
% H = REFLECTARRAY_GUI_V2 returns the handle to a new REFLECTARRAY_GUI_V2 or the handle to
% the existing singleton*.
%
% REFLECTARRAY_GUI_V2(‘CALLBACK’,hObject,eventData,handles,…) calls the local
% function named CALLBACK in REFLECTARRAY_GUI_V2.M with the given input arguments.
%
% REFLECTARRAY_GUI_V2(‘Property’,’Value’,…) creates a new REFLECTARRAY_GUI_V2 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before reflectarray_gui_v2_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to reflectarray_gui_v2_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE’s Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help reflectarray_gui_v2
% Last Modified by GUIDE v2.5 11-Dec-2019 22:58:28
% Begin initialization code – DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name’, mfilename, …
‘gui_Singleton’, gui_Singleton, …
‘gui_OpeningFcn’, @reflectarray_gui_v2_OpeningFcn, …
‘gui_OutputFcn’, @reflectarray_gui_v2_OutputFcn, …
‘gui_LayoutFcn’, [] , …
‘gui_Callback’, []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code – DO NOT EDIT
% — Executes just before reflectarray_gui_v2 is made visible.
function reflectarray_gui_v2_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to reflectarray_gui_v2 (see VARARGIN)
% Choose default command line output for reflectarray_gui_v2
handles.output = hObject;
axes(handles.axes1)
matlabImage = imread(‘D:S Mdrive-download-20240802T134608Z-001coord.jpg’);
image(matlabImage)
axis off
axis image
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes reflectarray_gui_v2 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% — Outputs from this function are returned to the command line.
function varargout = reflectarray_gui_v2_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit1 as text
% str2double(get(hObject,’String’)) returns contents of edit1 as a double
% — Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit2 as text
% str2double(get(hObject,’String’)) returns contents of edit2 as a double
% — Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit3 as text
% str2double(get(hObject,’String’)) returns contents of edit3 as a double
% — Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit4_Callback(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit4 as text
% str2double(get(hObject,’String’)) returns contents of edit4 as a double
% — Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit5_Callback(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit5 as text
% str2double(get(hObject,’String’)) returns contents of edit5 as a double
% — Executes during object creation, after setting all properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit7_Callback(hObject, eventdata, handles)
% hObject handle to edit7 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit7 as text
% str2double(get(hObject,’String’)) returns contents of edit7 as a double
% — Executes during object creation, after setting all properties.
function edit7_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit7 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit6_Callback(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit6 as text
% str2double(get(hObject,’String’)) returns contents of edit6 as a double
% — Executes during object creation, after setting all properties.
function edit6_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
% — Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles = guidata(hObject);
freq = str2double(get(handles.edit2,’string’))*10^9;
lambda = physconst(‘LightSpeed’)*1000/freq;
k=2*pi/lambda;
ix=1;
iy=1;
data=handles.data;
phas_u=data(:,1)’;
dim_u=data(:,2)’;
the_dir = str2double(get(handles.edit6,’string’));
phi_dir = str2double(get(handles.edit7,’string’));
pha_zer = str2double(get(handles.edit13,’string’));
x_cor = str2double(get(handles.edit3,’string’));
y_cor = str2double(get(handles.edit4,’string’));
z_cor = str2double(get(handles.edit5,’string’));
rad = str2double(get(handles.edit1,’string’));
uedim = str2double(get(handles.edit12,’string’));
for xi=-rad/2+mod(rad/2,uedim):uedim:rad/2
for yi=-rad/2+mod(rad/2,uedim):uedim:rad/2
if sqrt(xi^2+yi^2)<rad/2
R = sqrt((x_cor-xi)^2+(y_cor-yi)^2+z_cor^2);
phase(ix,iy)=k*(R-sind(the_dir)*(xi*cosd(phi_dir)+yi*sind(phi_dir)))+pha_zer;
m_phase=mod(phase(ix,iy),2*pi);
m_phase_deg=m_phase*180/pi-180;
% phas_lin_map=m_phase_deg*m+n;
if m_phase_deg > phas_u(1,1)
phas_lin_map = phas_u(1,1);
elseif m_phase_deg < phas_u(1,end)
phas_lin_map = phas_u(end,1);
else
dy = diff([0 phas_u]);
dyix = find(dy == 0);
dim_u(dyix) = dim_u(dyix-1)+1E-8;
phas_lin_map = interp1(phas_u, dim_u, m_phase_deg);
end
else
phase(ix,iy)=0;
end
iy=iy+1;
end
ix=ix+1;
iy=1;
end
m_phase=mod(phase,2*pi);
m_phase_deg=m_phase*180/pi;
m_phase_deg(:);
axes(handles.axes2)
surf(m_phase_deg)
view(2)
guidata(hObject, handles);
% — Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles = guidata(hObject);
addpath(genpath(‘C:UsersseymurDesktopcst-matlabCST-MATLAB-API-master’));
cst = actxserver(‘CSTStudio.application’);
mws = cst.invoke(‘NewMWS’);
CstDefaultUnits(mws)
fmin=2.2;
fmax=2.6;
CstDefineFrequencyRange(mws,fmin,fmax)
CstMeshInitiator(mws)
Xmin=’expanded open’;
Xmax=’expanded open’;
Ymin=’expanded open’;
Ymax=’expanded open’;
Zmin=’expanded open’;
Zmax=’expanded open’;
minfrequency = fmin;
CstDefineOpenBoundary(mws,minfrequency,Xmin,Xmax,Ymin,Ymax,Zmin,Zmax)
XminSpace = 0;
XmaxSpace = 0;
YminSpace = 0;
YmaxSpace = 0;
ZminSpace = 0;
ZmaxSpace = 0;
CstDefineBackroundMaterial(mws,XminSpace,XmaxSpace,YminSpace,YmaxSpace,ZminSpace,ZmaxSpace)
CstCopperAnnealedLossy(mws)
freq = str2double(get(handles.edit2,’string’))*10^9;
lambda = physconst(‘LightSpeed’)*1000/freq;
k=2*pi/lambda;
ix=1;
iy=1;
data=handles.data;
phas_u=data(:,1)’;
dim_u=data(:,2)’;
count=1;
the_dir = str2double(get(handles.edit6,’string’));
phi_dir = str2double(get(handles.edit7,’string’));
pha_zer = str2double(get(handles.edit13,’string’));
x_cor = str2double(get(handles.edit3,’string’));
y_cor = str2double(get(handles.edit4,’string’));
z_cor = str2double(get(handles.edit5,’string’));
rad = str2double(get(handles.edit1,’string’));
uedim = str2double(get(handles.edit12,’string’));
for xi=-rad/2+mod(rad/2,uedim):uedim:rad/2
for yi=-rad/2+mod(rad/2,uedim):uedim:rad/2
if sqrt(xi^2+yi^2)<rad/2
R = sqrt((x_cor-xi)^2+(y_cor-yi)^2+z_cor^2);
phase(ix,iy)=k*(R-sind(the_dir)*(xi*cosd(phi_dir)+yi*sind(phi_dir)))+pha_zer;
m_phase=mod(phase(ix,iy),2*pi);
m_phase_deg=m_phase*180/pi-180;
if m_phase_deg > phas_u(1,1)
phas_lin_map = dim_u(1,1);
elseif m_phase_deg < phas_u(1,end)
phas_lin_map = dim_u(end,1);
else
dy = diff([0 phas_u]);
dyix = find(dy == 0);
dim_u(dyix) = dim_u(dyix-1)+1E-8;
phas_lin_map = interp1(phas_u, dim_u, m_phase_deg);
end
%CST
Name=num2str(count);
component=’reflectarray’;
count=count+1;
material=’Copper (annealed)’;
Xrange = [-phas_lin_map/2+xi phas_lin_map/2+xi];
Yrange = [-phas_lin_map/2+yi phas_lin_map/2+yi];
Zrange = [0 0.1];
Cstbrick(mws, Name, component, material, Xrange, Yrange, Zrange)
else
phase(ix,iy)=0;
end
iy=iy+1;
end
ix=ix+1;
iy=1;
end
guidata(hObject, handles);
% — Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles = guidata(hObject);
[file,path] = uigetfile(‘*.txt’);
filename = [path file];
delimiter = ‘ ‘;
formatSpec = ‘%f%f%[^nr]’;
fileID = fopen(filename,’r’);
dataArray = textscan(fileID, formatSpec, ‘Delimiter’, delimiter, ‘MultipleDelimsAsOne’, true, ‘TextType’, ‘string’, ‘ReturnOnError’, false);
fclose(fileID);
handles.data = [dataArray{1:end-1}];
clearvars filename delimiter formatSpec fileID dataArray ans;
guidata(hObject, handles);
function edit12_Callback(hObject, eventdata, handles)
% hObject handle to edit12 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit12 as text
% str2double(get(hObject,’String’)) returns contents of edit12 as a double
% — Executes during object creation, after setting all properties.
function edit12_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit12 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit13_Callback(hObject, eventdata, handles)
% hObject handle to edit13 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit13 as text
% str2double(get(hObject,’String’)) returns contents of edit13 as a double
% — Executes during object creation, after setting all properties.
function edit13_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit13 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
endfunction varargout = reflectarray_gui_v2(varargin)
% REFLECTARRAY_GUI_V2 MATLAB code for reflectarray_gui_v2.fig
% REFLECTARRAY_GUI_V2, by itself, creates a new REFLECTARRAY_GUI_V2 or raises the existing
% singleton*.
%
% H = REFLECTARRAY_GUI_V2 returns the handle to a new REFLECTARRAY_GUI_V2 or the handle to
% the existing singleton*.
%
% REFLECTARRAY_GUI_V2(‘CALLBACK’,hObject,eventData,handles,…) calls the local
% function named CALLBACK in REFLECTARRAY_GUI_V2.M with the given input arguments.
%
% REFLECTARRAY_GUI_V2(‘Property’,’Value’,…) creates a new REFLECTARRAY_GUI_V2 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before reflectarray_gui_v2_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to reflectarray_gui_v2_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE’s Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help reflectarray_gui_v2
% Last Modified by GUIDE v2.5 11-Dec-2019 22:58:28
% Begin initialization code – DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name’, mfilename, …
‘gui_Singleton’, gui_Singleton, …
‘gui_OpeningFcn’, @reflectarray_gui_v2_OpeningFcn, …
‘gui_OutputFcn’, @reflectarray_gui_v2_OutputFcn, …
‘gui_LayoutFcn’, [] , …
‘gui_Callback’, []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code – DO NOT EDIT
% — Executes just before reflectarray_gui_v2 is made visible.
function reflectarray_gui_v2_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to reflectarray_gui_v2 (see VARARGIN)
% Choose default command line output for reflectarray_gui_v2
handles.output = hObject;
axes(handles.axes1)
matlabImage = imread(‘D:S Mdrive-download-20240802T134608Z-001coord.jpg’);
image(matlabImage)
axis off
axis image
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes reflectarray_gui_v2 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% — Outputs from this function are returned to the command line.
function varargout = reflectarray_gui_v2_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit1 as text
% str2double(get(hObject,’String’)) returns contents of edit1 as a double
% — Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit2 as text
% str2double(get(hObject,’String’)) returns contents of edit2 as a double
% — Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit3 as text
% str2double(get(hObject,’String’)) returns contents of edit3 as a double
% — Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit4_Callback(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit4 as text
% str2double(get(hObject,’String’)) returns contents of edit4 as a double
% — Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit5_Callback(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit5 as text
% str2double(get(hObject,’String’)) returns contents of edit5 as a double
% — Executes during object creation, after setting all properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit7_Callback(hObject, eventdata, handles)
% hObject handle to edit7 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit7 as text
% str2double(get(hObject,’String’)) returns contents of edit7 as a double
% — Executes during object creation, after setting all properties.
function edit7_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit7 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit6_Callback(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit6 as text
% str2double(get(hObject,’String’)) returns contents of edit6 as a double
% — Executes during object creation, after setting all properties.
function edit6_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
% — Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles = guidata(hObject);
freq = str2double(get(handles.edit2,’string’))*10^9;
lambda = physconst(‘LightSpeed’)*1000/freq;
k=2*pi/lambda;
ix=1;
iy=1;
data=handles.data;
phas_u=data(:,1)’;
dim_u=data(:,2)’;
the_dir = str2double(get(handles.edit6,’string’));
phi_dir = str2double(get(handles.edit7,’string’));
pha_zer = str2double(get(handles.edit13,’string’));
x_cor = str2double(get(handles.edit3,’string’));
y_cor = str2double(get(handles.edit4,’string’));
z_cor = str2double(get(handles.edit5,’string’));
rad = str2double(get(handles.edit1,’string’));
uedim = str2double(get(handles.edit12,’string’));
for xi=-rad/2+mod(rad/2,uedim):uedim:rad/2
for yi=-rad/2+mod(rad/2,uedim):uedim:rad/2
if sqrt(xi^2+yi^2)<rad/2
R = sqrt((x_cor-xi)^2+(y_cor-yi)^2+z_cor^2);
phase(ix,iy)=k*(R-sind(the_dir)*(xi*cosd(phi_dir)+yi*sind(phi_dir)))+pha_zer;
m_phase=mod(phase(ix,iy),2*pi);
m_phase_deg=m_phase*180/pi-180;
% phas_lin_map=m_phase_deg*m+n;
if m_phase_deg > phas_u(1,1)
phas_lin_map = phas_u(1,1);
elseif m_phase_deg < phas_u(1,end)
phas_lin_map = phas_u(end,1);
else
dy = diff([0 phas_u]);
dyix = find(dy == 0);
dim_u(dyix) = dim_u(dyix-1)+1E-8;
phas_lin_map = interp1(phas_u, dim_u, m_phase_deg);
end
else
phase(ix,iy)=0;
end
iy=iy+1;
end
ix=ix+1;
iy=1;
end
m_phase=mod(phase,2*pi);
m_phase_deg=m_phase*180/pi;
m_phase_deg(:);
axes(handles.axes2)
surf(m_phase_deg)
view(2)
guidata(hObject, handles);
% — Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles = guidata(hObject);
addpath(genpath(‘C:UsersseymurDesktopcst-matlabCST-MATLAB-API-master’));
cst = actxserver(‘CSTStudio.application’);
mws = cst.invoke(‘NewMWS’);
CstDefaultUnits(mws)
fmin=2.2;
fmax=2.6;
CstDefineFrequencyRange(mws,fmin,fmax)
CstMeshInitiator(mws)
Xmin=’expanded open’;
Xmax=’expanded open’;
Ymin=’expanded open’;
Ymax=’expanded open’;
Zmin=’expanded open’;
Zmax=’expanded open’;
minfrequency = fmin;
CstDefineOpenBoundary(mws,minfrequency,Xmin,Xmax,Ymin,Ymax,Zmin,Zmax)
XminSpace = 0;
XmaxSpace = 0;
YminSpace = 0;
YmaxSpace = 0;
ZminSpace = 0;
ZmaxSpace = 0;
CstDefineBackroundMaterial(mws,XminSpace,XmaxSpace,YminSpace,YmaxSpace,ZminSpace,ZmaxSpace)
CstCopperAnnealedLossy(mws)
freq = str2double(get(handles.edit2,’string’))*10^9;
lambda = physconst(‘LightSpeed’)*1000/freq;
k=2*pi/lambda;
ix=1;
iy=1;
data=handles.data;
phas_u=data(:,1)’;
dim_u=data(:,2)’;
count=1;
the_dir = str2double(get(handles.edit6,’string’));
phi_dir = str2double(get(handles.edit7,’string’));
pha_zer = str2double(get(handles.edit13,’string’));
x_cor = str2double(get(handles.edit3,’string’));
y_cor = str2double(get(handles.edit4,’string’));
z_cor = str2double(get(handles.edit5,’string’));
rad = str2double(get(handles.edit1,’string’));
uedim = str2double(get(handles.edit12,’string’));
for xi=-rad/2+mod(rad/2,uedim):uedim:rad/2
for yi=-rad/2+mod(rad/2,uedim):uedim:rad/2
if sqrt(xi^2+yi^2)<rad/2
R = sqrt((x_cor-xi)^2+(y_cor-yi)^2+z_cor^2);
phase(ix,iy)=k*(R-sind(the_dir)*(xi*cosd(phi_dir)+yi*sind(phi_dir)))+pha_zer;
m_phase=mod(phase(ix,iy),2*pi);
m_phase_deg=m_phase*180/pi-180;
if m_phase_deg > phas_u(1,1)
phas_lin_map = dim_u(1,1);
elseif m_phase_deg < phas_u(1,end)
phas_lin_map = dim_u(end,1);
else
dy = diff([0 phas_u]);
dyix = find(dy == 0);
dim_u(dyix) = dim_u(dyix-1)+1E-8;
phas_lin_map = interp1(phas_u, dim_u, m_phase_deg);
end
%CST
Name=num2str(count);
component=’reflectarray’;
count=count+1;
material=’Copper (annealed)’;
Xrange = [-phas_lin_map/2+xi phas_lin_map/2+xi];
Yrange = [-phas_lin_map/2+yi phas_lin_map/2+yi];
Zrange = [0 0.1];
Cstbrick(mws, Name, component, material, Xrange, Yrange, Zrange)
else
phase(ix,iy)=0;
end
iy=iy+1;
end
ix=ix+1;
iy=1;
end
guidata(hObject, handles);
% — Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles = guidata(hObject);
[file,path] = uigetfile(‘*.txt’);
filename = [path file];
delimiter = ‘ ‘;
formatSpec = ‘%f%f%[^nr]’;
fileID = fopen(filename,’r’);
dataArray = textscan(fileID, formatSpec, ‘Delimiter’, delimiter, ‘MultipleDelimsAsOne’, true, ‘TextType’, ‘string’, ‘ReturnOnError’, false);
fclose(fileID);
handles.data = [dataArray{1:end-1}];
clearvars filename delimiter formatSpec fileID dataArray ans;
guidata(hObject, handles);
function edit12_Callback(hObject, eventdata, handles)
% hObject handle to edit12 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit12 as text
% str2double(get(hObject,’String’)) returns contents of edit12 as a double
% — Executes during object creation, after setting all properties.
function edit12_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit12 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit13_Callback(hObject, eventdata, handles)
% hObject handle to edit13 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit13 as text
% str2double(get(hObject,’String’)) returns contents of edit13 as a double
% — Executes during object creation, after setting all properties.
function edit13_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit13 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end function varargout = reflectarray_gui_v2(varargin)
% REFLECTARRAY_GUI_V2 MATLAB code for reflectarray_gui_v2.fig
% REFLECTARRAY_GUI_V2, by itself, creates a new REFLECTARRAY_GUI_V2 or raises the existing
% singleton*.
%
% H = REFLECTARRAY_GUI_V2 returns the handle to a new REFLECTARRAY_GUI_V2 or the handle to
% the existing singleton*.
%
% REFLECTARRAY_GUI_V2(‘CALLBACK’,hObject,eventData,handles,…) calls the local
% function named CALLBACK in REFLECTARRAY_GUI_V2.M with the given input arguments.
%
% REFLECTARRAY_GUI_V2(‘Property’,’Value’,…) creates a new REFLECTARRAY_GUI_V2 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before reflectarray_gui_v2_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to reflectarray_gui_v2_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE’s Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help reflectarray_gui_v2
% Last Modified by GUIDE v2.5 11-Dec-2019 22:58:28
% Begin initialization code – DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name’, mfilename, …
‘gui_Singleton’, gui_Singleton, …
‘gui_OpeningFcn’, @reflectarray_gui_v2_OpeningFcn, …
‘gui_OutputFcn’, @reflectarray_gui_v2_OutputFcn, …
‘gui_LayoutFcn’, [] , …
‘gui_Callback’, []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code – DO NOT EDIT
% — Executes just before reflectarray_gui_v2 is made visible.
function reflectarray_gui_v2_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to reflectarray_gui_v2 (see VARARGIN)
% Choose default command line output for reflectarray_gui_v2
handles.output = hObject;
axes(handles.axes1)
matlabImage = imread(‘D:S Mdrive-download-20240802T134608Z-001coord.jpg’);
image(matlabImage)
axis off
axis image
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes reflectarray_gui_v2 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% — Outputs from this function are returned to the command line.
function varargout = reflectarray_gui_v2_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit1 as text
% str2double(get(hObject,’String’)) returns contents of edit1 as a double
% — Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit2 as text
% str2double(get(hObject,’String’)) returns contents of edit2 as a double
% — Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit3 as text
% str2double(get(hObject,’String’)) returns contents of edit3 as a double
% — Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit4_Callback(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit4 as text
% str2double(get(hObject,’String’)) returns contents of edit4 as a double
% — Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit5_Callback(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit5 as text
% str2double(get(hObject,’String’)) returns contents of edit5 as a double
% — Executes during object creation, after setting all properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit7_Callback(hObject, eventdata, handles)
% hObject handle to edit7 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit7 as text
% str2double(get(hObject,’String’)) returns contents of edit7 as a double
% — Executes during object creation, after setting all properties.
function edit7_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit7 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit6_Callback(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit6 as text
% str2double(get(hObject,’String’)) returns contents of edit6 as a double
% — Executes during object creation, after setting all properties.
function edit6_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
% — Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles = guidata(hObject);
freq = str2double(get(handles.edit2,’string’))*10^9;
lambda = physconst(‘LightSpeed’)*1000/freq;
k=2*pi/lambda;
ix=1;
iy=1;
data=handles.data;
phas_u=data(:,1)’;
dim_u=data(:,2)’;
the_dir = str2double(get(handles.edit6,’string’));
phi_dir = str2double(get(handles.edit7,’string’));
pha_zer = str2double(get(handles.edit13,’string’));
x_cor = str2double(get(handles.edit3,’string’));
y_cor = str2double(get(handles.edit4,’string’));
z_cor = str2double(get(handles.edit5,’string’));
rad = str2double(get(handles.edit1,’string’));
uedim = str2double(get(handles.edit12,’string’));
for xi=-rad/2+mod(rad/2,uedim):uedim:rad/2
for yi=-rad/2+mod(rad/2,uedim):uedim:rad/2
if sqrt(xi^2+yi^2)<rad/2
R = sqrt((x_cor-xi)^2+(y_cor-yi)^2+z_cor^2);
phase(ix,iy)=k*(R-sind(the_dir)*(xi*cosd(phi_dir)+yi*sind(phi_dir)))+pha_zer;
m_phase=mod(phase(ix,iy),2*pi);
m_phase_deg=m_phase*180/pi-180;
% phas_lin_map=m_phase_deg*m+n;
if m_phase_deg > phas_u(1,1)
phas_lin_map = phas_u(1,1);
elseif m_phase_deg < phas_u(1,end)
phas_lin_map = phas_u(end,1);
else
dy = diff([0 phas_u]);
dyix = find(dy == 0);
dim_u(dyix) = dim_u(dyix-1)+1E-8;
phas_lin_map = interp1(phas_u, dim_u, m_phase_deg);
end
else
phase(ix,iy)=0;
end
iy=iy+1;
end
ix=ix+1;
iy=1;
end
m_phase=mod(phase,2*pi);
m_phase_deg=m_phase*180/pi;
m_phase_deg(:);
axes(handles.axes2)
surf(m_phase_deg)
view(2)
guidata(hObject, handles);
% — Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles = guidata(hObject);
addpath(genpath(‘C:UsersseymurDesktopcst-matlabCST-MATLAB-API-master’));
cst = actxserver(‘CSTStudio.application’);
mws = cst.invoke(‘NewMWS’);
CstDefaultUnits(mws)
fmin=2.2;
fmax=2.6;
CstDefineFrequencyRange(mws,fmin,fmax)
CstMeshInitiator(mws)
Xmin=’expanded open’;
Xmax=’expanded open’;
Ymin=’expanded open’;
Ymax=’expanded open’;
Zmin=’expanded open’;
Zmax=’expanded open’;
minfrequency = fmin;
CstDefineOpenBoundary(mws,minfrequency,Xmin,Xmax,Ymin,Ymax,Zmin,Zmax)
XminSpace = 0;
XmaxSpace = 0;
YminSpace = 0;
YmaxSpace = 0;
ZminSpace = 0;
ZmaxSpace = 0;
CstDefineBackroundMaterial(mws,XminSpace,XmaxSpace,YminSpace,YmaxSpace,ZminSpace,ZmaxSpace)
CstCopperAnnealedLossy(mws)
freq = str2double(get(handles.edit2,’string’))*10^9;
lambda = physconst(‘LightSpeed’)*1000/freq;
k=2*pi/lambda;
ix=1;
iy=1;
data=handles.data;
phas_u=data(:,1)’;
dim_u=data(:,2)’;
count=1;
the_dir = str2double(get(handles.edit6,’string’));
phi_dir = str2double(get(handles.edit7,’string’));
pha_zer = str2double(get(handles.edit13,’string’));
x_cor = str2double(get(handles.edit3,’string’));
y_cor = str2double(get(handles.edit4,’string’));
z_cor = str2double(get(handles.edit5,’string’));
rad = str2double(get(handles.edit1,’string’));
uedim = str2double(get(handles.edit12,’string’));
for xi=-rad/2+mod(rad/2,uedim):uedim:rad/2
for yi=-rad/2+mod(rad/2,uedim):uedim:rad/2
if sqrt(xi^2+yi^2)<rad/2
R = sqrt((x_cor-xi)^2+(y_cor-yi)^2+z_cor^2);
phase(ix,iy)=k*(R-sind(the_dir)*(xi*cosd(phi_dir)+yi*sind(phi_dir)))+pha_zer;
m_phase=mod(phase(ix,iy),2*pi);
m_phase_deg=m_phase*180/pi-180;
if m_phase_deg > phas_u(1,1)
phas_lin_map = dim_u(1,1);
elseif m_phase_deg < phas_u(1,end)
phas_lin_map = dim_u(end,1);
else
dy = diff([0 phas_u]);
dyix = find(dy == 0);
dim_u(dyix) = dim_u(dyix-1)+1E-8;
phas_lin_map = interp1(phas_u, dim_u, m_phase_deg);
end
%CST
Name=num2str(count);
component=’reflectarray’;
count=count+1;
material=’Copper (annealed)’;
Xrange = [-phas_lin_map/2+xi phas_lin_map/2+xi];
Yrange = [-phas_lin_map/2+yi phas_lin_map/2+yi];
Zrange = [0 0.1];
Cstbrick(mws, Name, component, material, Xrange, Yrange, Zrange)
else
phase(ix,iy)=0;
end
iy=iy+1;
end
ix=ix+1;
iy=1;
end
guidata(hObject, handles);
% — Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles = guidata(hObject);
[file,path] = uigetfile(‘*.txt’);
filename = [path file];
delimiter = ‘ ‘;
formatSpec = ‘%f%f%[^nr]’;
fileID = fopen(filename,’r’);
dataArray = textscan(fileID, formatSpec, ‘Delimiter’, delimiter, ‘MultipleDelimsAsOne’, true, ‘TextType’, ‘string’, ‘ReturnOnError’, false);
fclose(fileID);
handles.data = [dataArray{1:end-1}];
clearvars filename delimiter formatSpec fileID dataArray ans;
guidata(hObject, handles);
function edit12_Callback(hObject, eventdata, handles)
% hObject handle to edit12 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit12 as text
% str2double(get(hObject,’String’)) returns contents of edit12 as a double
% — Executes during object creation, after setting all properties.
function edit12_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit12 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end
function edit13_Callback(hObject, eventdata, handles)
% hObject handle to edit13 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,’String’) returns contents of edit13 as text
% str2double(get(hObject,’String’)) returns contents of edit13 as a double
% — Executes during object creation, after setting all properties.
function edit13_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit13 (see GCBO)
% eventdata reserved – to be defined in a future version of MATLAB
% handles empty – handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,’BackgroundColor’), get(0,’defaultUicontrolBackgroundColor’))
set(hObject,’BackgroundColor’,’white’);
end error in reflectarray_gui_v2 (line 42) gui_mai MATLAB Answers — New Questions
Calculate normals from nodes which form a 3D curve
I have a composed cell:
in the first column: the P nodes;
in the second column: the circular geometries
in the third through fifth columns: the components a,b,c of the normal N of the circular geometry
Having other P nodes (see matrix ‘coord’) how can I calculate, for those nodes, the new components of the normal (a,b,c)?
load(‘test_p.mat’)
figure(‘units’,’normalized’,’outerposition’,[0 0 1 1]);
plot3(coord(:,1),coord(:,2),coord(:,3),’k.’,’Markersize’,5);
hold on
for t = 1:height(circle)
plot3(circle{t,1}(:,1),circle{t,1}(:,2),circle{t,1}(:,3),’k.’,’Markersize’,20);
patch(circle{t,2}(:,1),circle{t,2}(:,2),circle{t,2}(:,3),’k’,’FaceAlpha’,0.5);
end
hold off
axis equalI have a composed cell:
in the first column: the P nodes;
in the second column: the circular geometries
in the third through fifth columns: the components a,b,c of the normal N of the circular geometry
Having other P nodes (see matrix ‘coord’) how can I calculate, for those nodes, the new components of the normal (a,b,c)?
load(‘test_p.mat’)
figure(‘units’,’normalized’,’outerposition’,[0 0 1 1]);
plot3(coord(:,1),coord(:,2),coord(:,3),’k.’,’Markersize’,5);
hold on
for t = 1:height(circle)
plot3(circle{t,1}(:,1),circle{t,1}(:,2),circle{t,1}(:,3),’k.’,’Markersize’,20);
patch(circle{t,2}(:,1),circle{t,2}(:,2),circle{t,2}(:,3),’k’,’FaceAlpha’,0.5);
end
hold off
axis equal I have a composed cell:
in the first column: the P nodes;
in the second column: the circular geometries
in the third through fifth columns: the components a,b,c of the normal N of the circular geometry
Having other P nodes (see matrix ‘coord’) how can I calculate, for those nodes, the new components of the normal (a,b,c)?
load(‘test_p.mat’)
figure(‘units’,’normalized’,’outerposition’,[0 0 1 1]);
plot3(coord(:,1),coord(:,2),coord(:,3),’k.’,’Markersize’,5);
hold on
for t = 1:height(circle)
plot3(circle{t,1}(:,1),circle{t,1}(:,2),circle{t,1}(:,3),’k.’,’Markersize’,20);
patch(circle{t,2}(:,1),circle{t,2}(:,2),circle{t,2}(:,3),’k’,’FaceAlpha’,0.5);
end
hold off
axis equal normal, normals, 3d, 3d plots MATLAB Answers — New Questions
Parameter Estimation for a System of Differential Equations
Hello.
Ok, so I’m new to matlab and I’ve got a question regarding parameter estimation for a kinetic model.
I have 4 different reactants and their concentrations are c1, c2, c3 and c4. I also have 4 differential equations, each one related to a concentration (c1, c2, c3 and c4, respectively -see below-) and experimental data for all these concentrations on 12 different times plus the initial condition. The k’s are the rate coefficients. I want to solve this system of ODE’s using ode45 and then use the output to compute the experimental data minus the observed data and use these results to estimate the values of k’s using lsqnonlin, but apparently I can’t solve these ODE’s without numerical values for k -which is what I want to know-. Any help on how to set up the command to solve this?
function dcdt=batch(t,c,k)
dcdt=zeros(4,1);
dcdt(1)=-k(1)*c(1)-k(2)*c(1);
dcdt(2)= k(1)*c(1)+k(4)*c(3)-k(3)*c(2)-k(5)*c(2);
dcdt(3)= k(2)*c(1)+k(3)*c(2)-k(4)*c(3)+k(6)*c(4);
dcdt(4)= k(5)*c(2)-k(6)*c(4);
end
Data:
t c1 c2 c3 c4
0 1 0 0 0
0.1 0.902 0.06997 0.02463 0.00218
0.2 0.8072 0.1353 0.0482 0.008192
0.4 0.6757 0.2123 0.0864 0.0289
0.6 0.5569 0.2789 0.1063 0.06233
0.8 0.4297 0.3292 0.1476 0.09756
1 0.3774 0.3457 0.1485 0.1255
1.5 0.2149 0.3486 0.1821 0.2526
2 0.141 0.3254 0.194 0.3401
3 0.04921 0.2445 0.1742 0.5277
4 0.0178 0.1728 0.1732 0.6323
5 0.006431 0.1091 0.1137 0.7702
6 0.002595 0.08301 0.08224 0.835
Thanks in advance!Hello.
Ok, so I’m new to matlab and I’ve got a question regarding parameter estimation for a kinetic model.
I have 4 different reactants and their concentrations are c1, c2, c3 and c4. I also have 4 differential equations, each one related to a concentration (c1, c2, c3 and c4, respectively -see below-) and experimental data for all these concentrations on 12 different times plus the initial condition. The k’s are the rate coefficients. I want to solve this system of ODE’s using ode45 and then use the output to compute the experimental data minus the observed data and use these results to estimate the values of k’s using lsqnonlin, but apparently I can’t solve these ODE’s without numerical values for k -which is what I want to know-. Any help on how to set up the command to solve this?
function dcdt=batch(t,c,k)
dcdt=zeros(4,1);
dcdt(1)=-k(1)*c(1)-k(2)*c(1);
dcdt(2)= k(1)*c(1)+k(4)*c(3)-k(3)*c(2)-k(5)*c(2);
dcdt(3)= k(2)*c(1)+k(3)*c(2)-k(4)*c(3)+k(6)*c(4);
dcdt(4)= k(5)*c(2)-k(6)*c(4);
end
Data:
t c1 c2 c3 c4
0 1 0 0 0
0.1 0.902 0.06997 0.02463 0.00218
0.2 0.8072 0.1353 0.0482 0.008192
0.4 0.6757 0.2123 0.0864 0.0289
0.6 0.5569 0.2789 0.1063 0.06233
0.8 0.4297 0.3292 0.1476 0.09756
1 0.3774 0.3457 0.1485 0.1255
1.5 0.2149 0.3486 0.1821 0.2526
2 0.141 0.3254 0.194 0.3401
3 0.04921 0.2445 0.1742 0.5277
4 0.0178 0.1728 0.1732 0.6323
5 0.006431 0.1091 0.1137 0.7702
6 0.002595 0.08301 0.08224 0.835
Thanks in advance! Hello.
Ok, so I’m new to matlab and I’ve got a question regarding parameter estimation for a kinetic model.
I have 4 different reactants and their concentrations are c1, c2, c3 and c4. I also have 4 differential equations, each one related to a concentration (c1, c2, c3 and c4, respectively -see below-) and experimental data for all these concentrations on 12 different times plus the initial condition. The k’s are the rate coefficients. I want to solve this system of ODE’s using ode45 and then use the output to compute the experimental data minus the observed data and use these results to estimate the values of k’s using lsqnonlin, but apparently I can’t solve these ODE’s without numerical values for k -which is what I want to know-. Any help on how to set up the command to solve this?
function dcdt=batch(t,c,k)
dcdt=zeros(4,1);
dcdt(1)=-k(1)*c(1)-k(2)*c(1);
dcdt(2)= k(1)*c(1)+k(4)*c(3)-k(3)*c(2)-k(5)*c(2);
dcdt(3)= k(2)*c(1)+k(3)*c(2)-k(4)*c(3)+k(6)*c(4);
dcdt(4)= k(5)*c(2)-k(6)*c(4);
end
Data:
t c1 c2 c3 c4
0 1 0 0 0
0.1 0.902 0.06997 0.02463 0.00218
0.2 0.8072 0.1353 0.0482 0.008192
0.4 0.6757 0.2123 0.0864 0.0289
0.6 0.5569 0.2789 0.1063 0.06233
0.8 0.4297 0.3292 0.1476 0.09756
1 0.3774 0.3457 0.1485 0.1255
1.5 0.2149 0.3486 0.1821 0.2526
2 0.141 0.3254 0.194 0.3401
3 0.04921 0.2445 0.1742 0.5277
4 0.0178 0.1728 0.1732 0.6323
5 0.006431 0.1091 0.1137 0.7702
6 0.002595 0.08301 0.08224 0.835
Thanks in advance! parameter estimation, system of ode’s MATLAB Answers — New Questions
Passing File IDs from Power Apps to Power Automate and merging into PDF, then send an email
Hello,
I’m working on a PowerApps application that allows users to select specific files from a gallery (connected a sharepoint library), display them on a table for confirmation and then merge into a pdf to send to themselves. The process involves passing the IDs of the selected files from PowerApps to Power Automate, filtering the files based on these IDs, extracting the file content and merging them into a PDF.
I’m struggling with passing the IDs from Power Apps to automate. The flow reads the entire library (200+ items) instead of just the selected.
The configuration for my PowerApp button to call the flow is:
Hello, I’m working on a PowerApps application that allows users to select specific files from a gallery (connected a sharepoint library), display them on a table for confirmation and then merge into a pdf to send to themselves. The process involves passing the IDs of the selected files from PowerApps to Power Automate, filtering the files based on these IDs, extracting the file content and merging them into a PDF. I’m struggling with passing the IDs from Power Apps to automate. The flow reads the entire library (200+ items) instead of just the selected. The configuration for my PowerApp button to call the flow is:MergePDF.Run(Concat(SelectedItems, (ID),”,”);Notify(“Export process started. You will receive an email once complete.”, NotificationType.Success, 3000)). Please help ASAP!! Read More