Month: August 2024
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
Update formatting on Offer Listing
I want to update my already published offer with formatted text. During publishing, all the formatting and white space were stripped out.
I want to update my already published offer with formatted text. During publishing, all the formatting and white space were stripped out. Read More
PVA and Azure bot
Why Power Virtual Agent is better than Microsoft Azure Bot
A comparison of the features, offering and efficiency of two chatbot platforms
Chatbots are becoming more and more popular as a way to provide customer service, answer queries, and automate tasks. But how do you choose the right chatbot platform for your needs? In this blog post, we will compare two of the most popular chatbot platforms from Microsoft: Power Virtual Agent (PVA) and Azure Bot Service (ABS). We will look at their features, costs, and efficiency, and show you why PVA is a better choice for most scenarios.
Features
PVA and ABS both allow you to create chatbots that can interact with users through various channels, such as websites, mobile apps, social media, and Microsoft Teams. However, PVA has some advantages over ABS in terms of ease of use, functionality, and integration.
PVA is a low-code, no-code platform that lets you create chatbots using a graphical interface, without writing any code. You can design your chatbot’s conversation flow using a visual canvas, and use pre-built templates and entities to handle common scenarios. ABS, on the other hand, requires you to code your chatbot’s logic using C#, JavaScript, or Python, and use the Bot Framework SDK to build and deploy your chatbot. This means that you need to have some programming skills and knowledge of the SDK to use ABS.
PVA has a built-in natural language processing (NLP) engine that can understand user intents and entities, and handle complex and ambiguous user inputs. You can also train your chatbot to recognize custom intents and entities, and use synonyms and phrases to improve its accuracy. ABS does not have a native NLP engine, and you need to use a separate service, such as LUIS or QnA Maker ( integrated and called CLU now), to enable your chatbot to understand natural language. This adds another layer of complexity and cost to your chatbot development.
PVA has a seamless integration with Microsoft Power Platform, which is a suite of tools that can help you create and automate business solutions. You can easily connect your chatbot to Power Apps, Power Automate, Power BI, and Dataverse, and access data and actions from these services. You can also use Power Automate to create workflows and triggers for your chatbot, and use Dataverse to store and manage your chatbot’s data. ABS does not have a direct integration with Power Platform, and you need to use connectors and APIs to access data and actions from other services.
Extensive Pre-Built Connectors
Power Virtual Agents (PVA) stands out with its extensive collection of pre-built connectors, which significantly simplifies the process of integrating with various services and systems. PVA offers over 450 connectors, allowing users to easily connect their chatbots to a wide range of data sources and applications without the need for custom development1. This includes seamless integration with Microsoft Power Platform, enabling connections to Power Apps, Power Automate, Power BI, and Dataverse.
On the other hand, Azure Bot Service (ABS) does not come with a similar range of pre-built connectors. While ABS provides a robust framework for building and deploying chatbots, it requires users to develop custom connectors or use additional services like Logic Apps or Azure Functions to achieve similar integrations. This adds complexity and development effort, making PVA a more accessible and efficient choice for users who need quick and easy integrations.
Seamless Integration with Microsoft Ecosystem
Power Virtual Agents (PVA) offers seamless integration with the Microsoft ecosystem, making it an ideal choice for businesses that rely on Microsoft tools and services. PVA is designed to work effortlessly with the Microsoft Power Platform, which includes Power Apps, Power Automate, Power BI, and Dataverse. This integration allows users to create comprehensive business solutions by connecting their chatbots to various data sources and applications within the Microsoft ecosystem. For example, you can use Power Automate to create workflows and triggers for your chatbot, and Dataverse to store and manage your chatbot’s data.
On the other hand, Azure Bot Service (ABS) does not have the same level of seamless integration with the Microsoft ecosystem. While ABS provides a robust framework for building and deploying chatbots, it requires users to develop custom connectors or use additional services like Logic Apps or Azure Functions to achieve similar integrations. This adds complexity and development effort, making PVA a more accessible and efficient choice for users who need quick and easy integrations.
Efficiency
PVA and ABS both offer high-performance and scalable chatbot solutions that can handle large volumes of traffic and requests. However, PVA has some benefits over ABS in terms of speed, reliability, and maintenance.
PVA allows you to create and deploy chatbots in minutes, without any coding or infrastructure setup. You can use the PVA portal to design, test, and publish your chatbot, and monitor its performance and analytics. You can also update your chatbot’s content and logic at any time, without affecting its availability. ABS, on the other hand, requires you to code, build, and deploy your chatbot using the Bot Framework SDK and Azure services. This can take more time and effort, and you may encounter errors and bugs along the way. You also need to manage and update your chatbot’s code and dependencies, and ensure that your chatbot is compatible with the latest SDK and Azure versions.
PVA provides a reliable and secure chatbot platform that is hosted on Microsoft’s cloud infrastructure. You do not need to worry about the availability, scalability, or security of your chatbot, as Microsoft handles these aspects for you. You can also leverage Microsoft’s compliance and data protection policies, and choose the region where your chatbot’s data is stored and processed. ABS, on the other hand, gives you more control and flexibility over your chatbot’s infrastructure, but also more responsibility and risk. You need to configure and manage your chatbot’s hosting, scaling, and security settings, and ensure that your chatbot meets the compliance and data protection requirements of your region and industry.
In conclusion, PVA is a better choice than ABS for most chatbot scenarios, as it offers more features, lower costs, and higher efficiency. PVA is ideal for business users, non-developers, and anyone who wants to create chatbots quickly and easily, without coding or infrastructure hassles. ABS is more suitable for developers, advanced users, and anyone who wants to create chatbots with custom code and complex logic, and have more control and flexibility over their chatbot’s infrastructure.
Microsoft Tech Community – Latest Blogs –Read More
How do I plot an empty circle with no values in the middle of meshgrid plot3
Hi everyone.
Bascially I am tracking the depth of a surface using grids. x,y coordinates and z for depth. To fill the voids in between grids, I am using meshgrid with natural interpolation. However I have placed a circular piece in the middle of the grid hence on a plot3 it is supposed to be a white circular figue. How do I make sure this is drawn correctly because the image I attached does not look correct. Also how do I make sure that the meshgrid interpolates around the shape of the circle in the middle? This the code I have currently.
x = data(:,1); y = data(:,2); z = data(:,3)
x = table2array(x); y = table2array(y); z = table2array(z)
xlin = linspace(min(x), max(x), 100);
ylin = linspace(min(y), max(y), 100);
[X,Y] = meshgrid(xlin, ylin);
Z = griddata(x,y,z,X,Y,’natural’);
% Z = griddata(x,y,z,X,Y,’cubic’);
% Z = griddata(x,y,z,X,Y,’v4′);
mesh(X,Y,Z)
axis tight; hold on
plot3(x,y,z,’.’,’MarkerSize’,15)Hi everyone.
Bascially I am tracking the depth of a surface using grids. x,y coordinates and z for depth. To fill the voids in between grids, I am using meshgrid with natural interpolation. However I have placed a circular piece in the middle of the grid hence on a plot3 it is supposed to be a white circular figue. How do I make sure this is drawn correctly because the image I attached does not look correct. Also how do I make sure that the meshgrid interpolates around the shape of the circle in the middle? This the code I have currently.
x = data(:,1); y = data(:,2); z = data(:,3)
x = table2array(x); y = table2array(y); z = table2array(z)
xlin = linspace(min(x), max(x), 100);
ylin = linspace(min(y), max(y), 100);
[X,Y] = meshgrid(xlin, ylin);
Z = griddata(x,y,z,X,Y,’natural’);
% Z = griddata(x,y,z,X,Y,’cubic’);
% Z = griddata(x,y,z,X,Y,’v4′);
mesh(X,Y,Z)
axis tight; hold on
plot3(x,y,z,’.’,’MarkerSize’,15) Hi everyone.
Bascially I am tracking the depth of a surface using grids. x,y coordinates and z for depth. To fill the voids in between grids, I am using meshgrid with natural interpolation. However I have placed a circular piece in the middle of the grid hence on a plot3 it is supposed to be a white circular figue. How do I make sure this is drawn correctly because the image I attached does not look correct. Also how do I make sure that the meshgrid interpolates around the shape of the circle in the middle? This the code I have currently.
x = data(:,1); y = data(:,2); z = data(:,3)
x = table2array(x); y = table2array(y); z = table2array(z)
xlin = linspace(min(x), max(x), 100);
ylin = linspace(min(y), max(y), 100);
[X,Y] = meshgrid(xlin, ylin);
Z = griddata(x,y,z,X,Y,’natural’);
% Z = griddata(x,y,z,X,Y,’cubic’);
% Z = griddata(x,y,z,X,Y,’v4′);
mesh(X,Y,Z)
axis tight; hold on
plot3(x,y,z,’.’,’MarkerSize’,15) meshgrid, plot3 MATLAB Answers — New Questions
Help understanding how function handle is used
So I had an extremely helpful replier in an earlier question given me an equation for an interpolation function (I didn’t know about the floor and ceil function which would’ve answered my question and given me the opportunity to try writting the interpolation function myself, but I’m not going to look a gift horse in the mouth)
function fitness = interFt(Ft, x, j, k, t)
% Find the floor and ceiling for j and k
j_floor = floor(j);
j_ceil = ceil(j);
k_floor = floor(k);
k_ceil = ceil(k);
% Calculate probabilities based on the distance from the actual values
p_j_floor = j_ceil – j;
p_j_ceil = j – j_floor;
p_k_floor = k_ceil – k;
p_k_ceil = k – k_floor;
% Calculate the weighted fitness for each combination
fitness = 0;
fitness = fitness + p_j_floor * p_k_floor * Ft(x, j_floor, k_floor, t);
fitness = fitness + p_j_floor * p_k_ceil * Ft(x, j_floor, k_ceil, t);
fitness = fitness + p_j_ceil * p_k_floor * Ft(x, j_ceil, k_floor, t);
fitness = fitness + p_j_ceil * p_k_ceil * Ft(x, j_ceil, k_ceil, t);
end
They also gave me an example of how to use the function, but they used a function handle and i’m not sure how it’s being used
for tt=19:-1:1
for i=1:15
for j=1:15
for k=1:15
% here is a snipet of my code that I’m using with one of the
% examples of how I’m using the InterFt function; it’s set up
% exactly how the replier showed
state1 = interFt(@(x,j,k,t) Ft(x,j,k,t), xp(i),zp(j),yy(k),tt+1);
end
end
end
end
Why is Ft not included in the @()?
Why is it that when I change the x’s to i’s it messes things up (while also changing the x to an i in the written function)?
I know you’re not supposed to include the entire code, but let me know if that’s needed to see what I mean
Here is the link to the original question: https://www.mathworks.com/matlabcentral/answers/2119211-creating-a-function-for-linear-interpolation-based-on-two-changing-states?s_tid=srchtitle
[[I have a lot of code that I think has something wrong with it, and I think has to do with the states, but I’m not sure how I need to "fix" it]]So I had an extremely helpful replier in an earlier question given me an equation for an interpolation function (I didn’t know about the floor and ceil function which would’ve answered my question and given me the opportunity to try writting the interpolation function myself, but I’m not going to look a gift horse in the mouth)
function fitness = interFt(Ft, x, j, k, t)
% Find the floor and ceiling for j and k
j_floor = floor(j);
j_ceil = ceil(j);
k_floor = floor(k);
k_ceil = ceil(k);
% Calculate probabilities based on the distance from the actual values
p_j_floor = j_ceil – j;
p_j_ceil = j – j_floor;
p_k_floor = k_ceil – k;
p_k_ceil = k – k_floor;
% Calculate the weighted fitness for each combination
fitness = 0;
fitness = fitness + p_j_floor * p_k_floor * Ft(x, j_floor, k_floor, t);
fitness = fitness + p_j_floor * p_k_ceil * Ft(x, j_floor, k_ceil, t);
fitness = fitness + p_j_ceil * p_k_floor * Ft(x, j_ceil, k_floor, t);
fitness = fitness + p_j_ceil * p_k_ceil * Ft(x, j_ceil, k_ceil, t);
end
They also gave me an example of how to use the function, but they used a function handle and i’m not sure how it’s being used
for tt=19:-1:1
for i=1:15
for j=1:15
for k=1:15
% here is a snipet of my code that I’m using with one of the
% examples of how I’m using the InterFt function; it’s set up
% exactly how the replier showed
state1 = interFt(@(x,j,k,t) Ft(x,j,k,t), xp(i),zp(j),yy(k),tt+1);
end
end
end
end
Why is Ft not included in the @()?
Why is it that when I change the x’s to i’s it messes things up (while also changing the x to an i in the written function)?
I know you’re not supposed to include the entire code, but let me know if that’s needed to see what I mean
Here is the link to the original question: https://www.mathworks.com/matlabcentral/answers/2119211-creating-a-function-for-linear-interpolation-based-on-two-changing-states?s_tid=srchtitle
[[I have a lot of code that I think has something wrong with it, and I think has to do with the states, but I’m not sure how I need to "fix" it]] So I had an extremely helpful replier in an earlier question given me an equation for an interpolation function (I didn’t know about the floor and ceil function which would’ve answered my question and given me the opportunity to try writting the interpolation function myself, but I’m not going to look a gift horse in the mouth)
function fitness = interFt(Ft, x, j, k, t)
% Find the floor and ceiling for j and k
j_floor = floor(j);
j_ceil = ceil(j);
k_floor = floor(k);
k_ceil = ceil(k);
% Calculate probabilities based on the distance from the actual values
p_j_floor = j_ceil – j;
p_j_ceil = j – j_floor;
p_k_floor = k_ceil – k;
p_k_ceil = k – k_floor;
% Calculate the weighted fitness for each combination
fitness = 0;
fitness = fitness + p_j_floor * p_k_floor * Ft(x, j_floor, k_floor, t);
fitness = fitness + p_j_floor * p_k_ceil * Ft(x, j_floor, k_ceil, t);
fitness = fitness + p_j_ceil * p_k_floor * Ft(x, j_ceil, k_floor, t);
fitness = fitness + p_j_ceil * p_k_ceil * Ft(x, j_ceil, k_ceil, t);
end
They also gave me an example of how to use the function, but they used a function handle and i’m not sure how it’s being used
for tt=19:-1:1
for i=1:15
for j=1:15
for k=1:15
% here is a snipet of my code that I’m using with one of the
% examples of how I’m using the InterFt function; it’s set up
% exactly how the replier showed
state1 = interFt(@(x,j,k,t) Ft(x,j,k,t), xp(i),zp(j),yy(k),tt+1);
end
end
end
end
Why is Ft not included in the @()?
Why is it that when I change the x’s to i’s it messes things up (while also changing the x to an i in the written function)?
I know you’re not supposed to include the entire code, but let me know if that’s needed to see what I mean
Here is the link to the original question: https://www.mathworks.com/matlabcentral/answers/2119211-creating-a-function-for-linear-interpolation-based-on-two-changing-states?s_tid=srchtitle
[[I have a lot of code that I think has something wrong with it, and I think has to do with the states, but I’m not sure how I need to "fix" it]] interpolation, function handle MATLAB Answers — New Questions
How to generate Generic VHDL from simulink for sysgen model?
I have used xilinx basic blocks to design a model. I wanted to generate generic VHDL without xilinx specific references. Eventhough i have choosen Behavioural HDL for implementation generated vhdl consist of xilinx specific DFlip-Flop and SRLUTs. Kindly let me know if there is a way? if the option is not being applied then how can we write a matlab sript to set automatically without doing it manually?I have used xilinx basic blocks to design a model. I wanted to generate generic VHDL without xilinx specific references. Eventhough i have choosen Behavioural HDL for implementation generated vhdl consist of xilinx specific DFlip-Flop and SRLUTs. Kindly let me know if there is a way? if the option is not being applied then how can we write a matlab sript to set automatically without doing it manually? I have used xilinx basic blocks to design a model. I wanted to generate generic VHDL without xilinx specific references. Eventhough i have choosen Behavioural HDL for implementation generated vhdl consist of xilinx specific DFlip-Flop and SRLUTs. Kindly let me know if there is a way? if the option is not being applied then how can we write a matlab sript to set automatically without doing it manually? systemgenerator, vhdl, matlab, xilinx, simulink MATLAB Answers — New Questions
How do I solve this error?: Matrix out of range for deletion
Can someone help me to figure out why I am out of range for deletion with this? This code was first used with data that had multiple values in the matrix (i.e. "carbclay" was a matrix with 4 values), but now I’m only doing it with one value, so maybe that’s why it’s not working? I have gotten a lot of help with this so I don’t quite understand it fully, forgive my lack of knowledge when it comes to calling things the right name, hope someone can understand what’s wrong:( The goal of the code is to be able to leave off legend entries if any of the data that I want to plot is missing from my table.
carbclay=[rocktypes(1)]; missingdata1=[];
np = 0;
hp = [];
legtxt = {};
i = find(string(TAllData.gen_rock_type)==carbclay);
if any([sum(isnan(TAllData.a_b(i)))==length(i),sum(isnan(TAllData.temp(i)))==length(i)])
missingdata1=[missingdata1,i];
else hp(end+1) = scatter(TAllData.temp(i),TAllData.a_b(i),120,c1,’filled’,’o’,’MarkerFaceAlpha’,0.7);
legtxt{end+1} = carbclay{1};
end
carbclay(missingdata1)=”; %The error happens here for some reason, and then the legend does not show up
legend(hp,legtxt,’Location’,’northeastoutside’);
Error Message:
Matrix index is out of range for deletion.
Error in ScriptForPlots_RFD (line 1507)
carbclay(missingdata1)=”;Can someone help me to figure out why I am out of range for deletion with this? This code was first used with data that had multiple values in the matrix (i.e. "carbclay" was a matrix with 4 values), but now I’m only doing it with one value, so maybe that’s why it’s not working? I have gotten a lot of help with this so I don’t quite understand it fully, forgive my lack of knowledge when it comes to calling things the right name, hope someone can understand what’s wrong:( The goal of the code is to be able to leave off legend entries if any of the data that I want to plot is missing from my table.
carbclay=[rocktypes(1)]; missingdata1=[];
np = 0;
hp = [];
legtxt = {};
i = find(string(TAllData.gen_rock_type)==carbclay);
if any([sum(isnan(TAllData.a_b(i)))==length(i),sum(isnan(TAllData.temp(i)))==length(i)])
missingdata1=[missingdata1,i];
else hp(end+1) = scatter(TAllData.temp(i),TAllData.a_b(i),120,c1,’filled’,’o’,’MarkerFaceAlpha’,0.7);
legtxt{end+1} = carbclay{1};
end
carbclay(missingdata1)=”; %The error happens here for some reason, and then the legend does not show up
legend(hp,legtxt,’Location’,’northeastoutside’);
Error Message:
Matrix index is out of range for deletion.
Error in ScriptForPlots_RFD (line 1507)
carbclay(missingdata1)=”; Can someone help me to figure out why I am out of range for deletion with this? This code was first used with data that had multiple values in the matrix (i.e. "carbclay" was a matrix with 4 values), but now I’m only doing it with one value, so maybe that’s why it’s not working? I have gotten a lot of help with this so I don’t quite understand it fully, forgive my lack of knowledge when it comes to calling things the right name, hope someone can understand what’s wrong:( The goal of the code is to be able to leave off legend entries if any of the data that I want to plot is missing from my table.
carbclay=[rocktypes(1)]; missingdata1=[];
np = 0;
hp = [];
legtxt = {};
i = find(string(TAllData.gen_rock_type)==carbclay);
if any([sum(isnan(TAllData.a_b(i)))==length(i),sum(isnan(TAllData.temp(i)))==length(i)])
missingdata1=[missingdata1,i];
else hp(end+1) = scatter(TAllData.temp(i),TAllData.a_b(i),120,c1,’filled’,’o’,’MarkerFaceAlpha’,0.7);
legtxt{end+1} = carbclay{1};
end
carbclay(missingdata1)=”; %The error happens here for some reason, and then the legend does not show up
legend(hp,legtxt,’Location’,’northeastoutside’);
Error Message:
Matrix index is out of range for deletion.
Error in ScriptForPlots_RFD (line 1507)
carbclay(missingdata1)=”; matrix, table, legend MATLAB Answers — New Questions
Seasonal decomposition of a daily time series
I have a time series that contains daily variation from 2015 to 2023. I want to see the trend, seasonal components and unmodelled part. Kindly help. The time series has veen attachedI have a time series that contains daily variation from 2015 to 2023. I want to see the trend, seasonal components and unmodelled part. Kindly help. The time series has veen attached I have a time series that contains daily variation from 2015 to 2023. I want to see the trend, seasonal components and unmodelled part. Kindly help. The time series has veen attached time series analysis, seasonal adjustment, seasonal decomposition MATLAB Answers — New Questions
Outlook contact business cards partially covered by black bars
The Microsoft agent on the Microsoft Outlook Community Forum suggested I cross-post the issue here so it can be fixed.
Please see the full discussion at: https://answers.microsoft.com/en-us/outlook_com/forum/outlk_win-outtop_classic-outsub_ofh/outlook-contact-business-cards-partially-covered/0386d601-1193-435e-801a-68392cf8b7c6?messageId=f6e3b6f5-863c-4450-87d8-cb272dd9c139
Here is a copy:
For many years, though several versions of Outlook for Windows and on multiple machines running everything from Windows 7 through Windows 11, I’ve been putting up with big black bars covering the bottom parts of many of my contacts’ business cards. This never happens with the contacts at the top of my list, but it always happens with the contacts near the bottom. (I have ~5,000 contacts, and the bars start to appear as I scroll down past the 2,500 mark or so.)
Some are worse than others:
Here’s the overall view near the end of the alphabet. Notice that some rows of business cards have thicker bars than others, but as you scroll down further in the alphabet, all rows get the bars. (Ignore the grey boxes. I added those to obscure the details. It’s the black boxes that I’m talking about. They’re what I see.)
It never happens near the top of the alphabet:
This has been reported by many other users over the years, but never solved:
…and…
…and elsewhere.
I’ve tried all of the various suggestions about disabling animations and hardware acceleration, but nothing works. And since I’ve observed this on multiple systems with different graphics cards, different monitors, different OSs, different Office versions, and both laptops and desktops, I have to assume this is an inherent Office bug that has something to do with very long contact lists in the business card view.
I’m running Microsoft® Outlook® 2019 MSO (Version 2406 Build 16.0.17726.20078) 64-bit on Windows 11 Pro 64-bit, but as I wrote above, I’ve had the same problem as far back as Windows 7 or 8 and Office 2010 or 2013.
From the discussion on the Community Forum, it became clear that scaling the contact cards at or below 85% (Contacts > View > View Settings > Other Settings… > Card size %) and restarting Outlook makes the black bars go away, but then the cards are too small to be useful. It also was confirmed there that effect is currently visible and reproducible across at least two users and platforms. So, this is some kind of a scaling issue, and it’s a bug.
Can this be fixed?
Thank you.
The Microsoft agent on the Microsoft Outlook Community Forum suggested I cross-post the issue here so it can be fixed. Please see the full discussion at: https://answers.microsoft.com/en-us/outlook_com/forum/outlk_win-outtop_classic-outsub_ofh/outlook-contact-business-cards-partially-covered/0386d601-1193-435e-801a-68392cf8b7c6?messageId=f6e3b6f5-863c-4450-87d8-cb272dd9c139 Here is a copy: For many years, though several versions of Outlook for Windows and on multiple machines running everything from Windows 7 through Windows 11, I’ve been putting up with big black bars covering the bottom parts of many of my contacts’ business cards. This never happens with the contacts at the top of my list, but it always happens with the contacts near the bottom. (I have ~5,000 contacts, and the bars start to appear as I scroll down past the 2,500 mark or so.) Some are worse than others: Here’s the overall view near the end of the alphabet. Notice that some rows of business cards have thicker bars than others, but as you scroll down further in the alphabet, all rows get the bars. (Ignore the grey boxes. I added those to obscure the details. It’s the black boxes that I’m talking about. They’re what I see.) It never happens near the top of the alphabet: This has been reported by many other users over the years, but never solved:https://answers.microsoft.com/en-us/outlook_com/forum/all/outlook-contacts-black-line/efaf4d45-98cd-48ec-95a9-d9c40ebb0978…and…https://answers.microsoft.com/en-us/outlook_com/forum/all/busines-card-view-corruption-in-outlook-2016-64/6195cb49-a461-4aaa-b233-511aa4d5fb4f…and elsewhere. I’ve tried all of the various suggestions about disabling animations and hardware acceleration, but nothing works. And since I’ve observed this on multiple systems with different graphics cards, different monitors, different OSs, different Office versions, and both laptops and desktops, I have to assume this is an inherent Office bug that has something to do with very long contact lists in the business card view. I’m running Microsoft® Outlook® 2019 MSO (Version 2406 Build 16.0.17726.20078) 64-bit on Windows 11 Pro 64-bit, but as I wrote above, I’ve had the same problem as far back as Windows 7 or 8 and Office 2010 or 2013. From the discussion on the Community Forum, it became clear that scaling the contact cards at or below 85% (Contacts > View > View Settings > Other Settings… > Card size %) and restarting Outlook makes the black bars go away, but then the cards are too small to be useful. It also was confirmed there that effect is currently visible and reproducible across at least two users and platforms. So, this is some kind of a scaling issue, and it’s a bug.Can this be fixed? Thank you. Read More
Storage Account Private Endpoint with Compute Gallery
Hopefully this is the right group to pose this question. I have a Compute Gallery with some VM Applications in it. I have the Storage Account with the blobs configured with a Private Endpoint. When I try to turn off Public Network Access, the VM Apps in the Gallery no longer function, citing access issues.
I’m assuming the Compute Gallery won’t access my Storage Account over a Private Link inside my vNET, so my question is how do I lock down the Storage Account to not have things wide open? Is there specific IPs that the Compute Gallery will use when accessing the Storage Account?
Hopefully this is the right group to pose this question. I have a Compute Gallery with some VM Applications in it. I have the Storage Account with the blobs configured with a Private Endpoint. When I try to turn off Public Network Access, the VM Apps in the Gallery no longer function, citing access issues.I’m assuming the Compute Gallery won’t access my Storage Account over a Private Link inside my vNET, so my question is how do I lock down the Storage Account to not have things wide open? Is there specific IPs that the Compute Gallery will use when accessing the Storage Account? Read More
OneNote Web App Text Box width
When using OneNote Web app and pasting in a block of text, the text box is created about 2 feet wide, scrolling off the screen to the right. If you scroll over to the right edge and try to resize the box by dragging it to the left, then the text itself, which was its original width, gets severely narrowed to the point it is unusable.
To Reproduce, paste this block (or any similar) of text into OneNote web app, then notice the width of the text box and try to resize it:
Why attack surface reduction rules are important
Your organization’s attack surface includes all the places where an attacker could compromise your organization’s devices or networks. Reducing your attack surface means protecting your organization’s devices and network, which leaves attackers with fewer ways to perform attacks. Configuring attack surface reduction rules in Microsoft Defender for Endpoint can help!
Attack surface reduction rules target certain software behaviors, such as:
Launching executable files and scripts that attempt to download or run filesRunning obfuscated or otherwise suspicious scriptsPerforming behaviors that apps don’t usually initiate during normal day-to-day work
Such software behaviors are sometimes seen in legitimate applications. However, these behaviors are often considered risky because they’re commonly abused by attackers through malware. Attack surface reduction rules can constrain software-based risky behaviors and help keep your organization safe.
For a sequential, end-to-end process of how to manage attack surface reduction rules, see:
Attack surface reduction rules deployment overviewPlan attack surface reduction rules deploymentTest attack surface reduction rulesEnable attack surface reduction rulesOperationalize attack surface reduction rules
When using OneNote Web app and pasting in a block of text, the text box is created about 2 feet wide, scrolling off the screen to the right. If you scroll over to the right edge and try to resize the box by dragging it to the left, then the text itself, which was its original width, gets severely narrowed to the point it is unusable. To Reproduce, paste this block (or any similar) of text into OneNote web app, then notice the width of the text box and try to resize it: Why attack surface reduction rules are importantYour organization’s attack surface includes all the places where an attacker could compromise your organization’s devices or networks. Reducing your attack surface means protecting your organization’s devices and network, which leaves attackers with fewer ways to perform attacks. Configuring attack surface reduction rules in Microsoft Defender for Endpoint can help!Attack surface reduction rules target certain software behaviors, such as:Launching executable files and scripts that attempt to download or run filesRunning obfuscated or otherwise suspicious scriptsPerforming behaviors that apps don’t usually initiate during normal day-to-day workSuch software behaviors are sometimes seen in legitimate applications. However, these behaviors are often considered risky because they’re commonly abused by attackers through malware. Attack surface reduction rules can constrain software-based risky behaviors and help keep your organization safe.For a sequential, end-to-end process of how to manage attack surface reduction rules, see:Attack surface reduction rules deployment overviewPlan attack surface reduction rules deploymentTest attack surface reduction rulesEnable attack surface reduction rulesOperationalize attack surface reduction rules Read More
How to view 2 weeks in new calendar
This was so easy in the old calendar. All I did was hold the CTRL button and highlight the days I needed to view, I would then be able to see 2 weeks on my screen and all the details of each day within that 2 week timeframe. I have tried everything in the new outlook and cannot figure out how to do this. Please help??? (This is a key feature I use for my business)
This was so easy in the old calendar. All I did was hold the CTRL button and highlight the days I needed to view, I would then be able to see 2 weeks on my screen and all the details of each day within that 2 week timeframe. I have tried everything in the new outlook and cannot figure out how to do this. Please help??? (This is a key feature I use for my business) Read More
Recover Multiple VMs from Azure Backup in Less Time
In the dynamic world of cloud computing, time is often a critical factor, especially when it comes to recovering from disasters like ransomware attacks or rolling back after a problematic security update. Imagine waking up to find your entire set of Azure VMs compromised by ransomware or discovering that a recent security update has left your systems inoperable. The clock starts ticking, and the longer it takes to restore your VMs, the greater the impact on your business.
The Problem
Azure Backup is a robust solution for protecting your Azure VMs, providing peace of mind with its ability to create and manage backup policies, configure backup schedules, and perform reliable restores. However, the features available for Azure Backup in the Portal UI today only allow the restoration of individual VMs one at a time. Restoring many VMs manually through the Azure Portal can be extremely time-consuming and inefficient, especially when you need to restore an entire set of VMs quickly.
Native Capabilities of Azure Backup
Azure Backup offers extensive features for protecting your VMs:
Automated backup schedules and retention policies – A backup policy can protect multiple Azure VMs consisting of a schedule (daily/weekly) and retention (daily, weekly, monthly, yearly).
Cross-region restore capabilities – Allows you to restore data in a secondary, Azure paired region. This can be useful to conduct BCDR drills or if there’s a disaster in the primary region.
Ransomware protection – Features such as irreversible soft-delete, immutable storage and multi-user authorization can be set at the vault level to safeguard backup data.
Despite these powerful features, there is always room for improvement. For now, there is currently no functionality in the Azure Portal to batch restore multiple VMs simultaneously. This limitation becomes a bottleneck in scenarios where speed and efficiency are paramount.
Az PowerShell Module – A Good Solution
To address this gap, we turn to PowerShell scripting, a versatile and powerful tool for managing Azure resources. Microsoft’s Az PowerShell module provides a comprehensive suite of cmdlets to automate and manage Azure tasks, including VM backups and restores.
Here’s a practical approach: a PowerShell script that enables the parallel restoration of multiple VMs from Azure Backup. This script leverages Az.RecoveryServices to streamline the recovery process, significantly reducing the time required to get your systems back online.
Sample PowerShell Script
Below is a summary of how one example script works. You can find the full example here.
Define Variables:
The script starts by defining the necessary variables, including the resource group, recovery services vault, and cache storage account.
$resourceGroup = “rg-webservers”
$recoveryServicesVault = “rsv-vmbackup”
$cacheStorageAccount = “unique626872”
$cacheStorageAccountResourceGroup = “rg-webservers”
Get the Vault and Backup Container:
It then retrieves the Recovery Services Vault and Backup Container containing multiple VMs that need to be restored in parallel.
$vault = Get-AzRecoveryServicesVault -ResourceGroupName $resourceGroup -Name $recoveryServicesVault
$container = Get-AzRecoveryServicesBackupContainer -ContainerType “AzureVM” -VaultId $vault.ID
Loop Through the Backup Items:
The script iterates over each backup item in the container, performing a shutdown and kicking off an in-place restore from the latest recovery points.
foreach ($item in $container) {
# Get the Backup Item from the Vault
$backupItem = Get-AzRecoveryServicesBackupItem -BackupManagementType “AzureVM” -WorkloadType “AzureVM” -VaultId $vault.ID -Name $item.Name
# Get the resource group & VM name for this backupItem
$vmResourceGroup = $backupItem.VirtualMachineId.Split(‘/’)[4]
$vmName = $backupItem.VirtualMachineId.Split(‘/’)[8]
# Shut down the protected VM before restoring it
Stop-AzVM -ResourceGroupName $vmResourceGroup -Name $vmName -Force -SkipShutdown -NoWait
# Get the latest recovery point for the backup item from the last 7 days
$recoveryPoints = Get-AzRecoveryServicesBackupRecoveryPoint -Item $backupItem -VaultId $vault.ID -StartDate (Get-Date).AddDays(-7).ToUniversalTime() -EndDate (Get-Date).ToUniversalTime()
# Restore the Azure VM from the latest recovery point to the original location (replace the source VM)
$OriginalLocationRestoreJob = Restore-AzRecoveryServicesBackupItem -RecoveryPoint $recoveryPoints[0] -StorageAccountName $cacheStorageAccount -StorageAccountResourceGroupName $cacheStorageAccountResourceGroup -VaultId $vault.ID -VaultLocation $vault.Location
}
By using this script, you can dramatically reduce the time required to restore multiple VMs, enhancing your ability to recover from critical incidents swiftly.
Conclusion
In this post, we’ve discussed the limitations in the Azure Portal for handling multiple VM restores and introduced a practical workaround using PowerShell scripting. This solution enables you to restore your VMs in parallel, significantly cutting down recovery time and minimizing business disruption.
We encourage you to modify the sample script, try it out in your test environment and see the benefits for yourself. Your feedback is invaluable, so please share your experiences and let us know your thoughts on this approach. Together, we can continue to improve and innovate in the realm of Azure Business Continuity.
Call to Action
Modify the sample script and try it out in your test environment for parallel VM restoration.
Share your feedback and experiences with us.
Stay tuned for more tips and tricks on maximizing your Azure capabilities.
Happy scripting, and may your recoveries be swift and seamless!
Microsoft Tech Community – Latest Blogs –Read More
Please explain the maths behind calculating lateral deviation
Please explain me the maths behind the lateral deviation used in many exmples.
Curvature unit is m-1 and if we multiply by logitudinal velocity (m/s), we get s-1 which is rate of change / frequency. How are we subrating Yaw rate by it?
And how are we getting e1 from u3*u2 + u1?Please explain me the maths behind the lateral deviation used in many exmples.
Curvature unit is m-1 and if we multiply by logitudinal velocity (m/s), we get s-1 which is rate of change / frequency. How are we subrating Yaw rate by it?
And how are we getting e1 from u3*u2 + u1? Please explain me the maths behind the lateral deviation used in many exmples.
Curvature unit is m-1 and if we multiply by logitudinal velocity (m/s), we get s-1 which is rate of change / frequency. How are we subrating Yaw rate by it?
And how are we getting e1 from u3*u2 + u1? model predictive control toolbox, vehicle dynamics, trajectories, path planning MATLAB Answers — New Questions