Month: May 2024
Use Word Template Content in Print to Size 10 Envelope
I have been trying to configure content to print on lower/center of a
size 10 envelope.
The envelopes are loaded in the manual feeder tray as shown below.
I am using Power Automate to collect data from an Excel
document and placing it in the below Word Template
document, where there are several mail merge fields
(see below).
I am using Power Automate to place each address into a
Word file. I am PA to convert the Word file to PDF. I then
use PA to merge each Word files into a single PDF file
(see below).
I have yet to be able to figure out how to set the printer
setting to sitution the content from the merged PDF file
so that is prints onto the size 10 envelope in the lower/center.
What am I missing?
I have been trying to configure content to print on lower/center of asize 10 envelope.The envelopes are loaded in the manual feeder tray as shown below.I am using Power Automate to collect data from an Exceldocument and placing it in the below Word Templatedocument, where there are several mail merge fields(see below).I am using Power Automate to place each address into aWord file. I am PA to convert the Word file to PDF. I thenuse PA to merge each Word files into a single PDF file(see below). I have yet to be able to figure out how to set the printersetting to sitution the content from the merged PDF fileso that is prints onto the size 10 envelope in the lower/center.What am I missing? Read More
Attack Simulation Training in Chinese showing as garbled character
Hi All,
We recently moved to a new mail security gateway and initiated an attack simulation training from Microsoft. The scenario include 2 recipient; one from exchange online(EXO) and the other is exchange 2019 mailbox(OP).
OP mail flow will go through mail security gateway before delivering to enduser while EXO go through EOP. Thing is using same payload and simulation, email to OP user always show as garbled and the link inside will contain a space which break the link. Meanwhile email to EXO works just fine.
I believe it has something to do with the encoding, does anyone come around this issue before?
Thanks Y’all
Hi All, We recently moved to a new mail security gateway and initiated an attack simulation training from Microsoft. The scenario include 2 recipient; one from exchange online(EXO) and the other is exchange 2019 mailbox(OP). OP mail flow will go through mail security gateway before delivering to enduser while EXO go through EOP. Thing is using same payload and simulation, email to OP user always show as garbled and the link inside will contain a space which break the link. Meanwhile email to EXO works just fine. I believe it has something to do with the encoding, does anyone come around this issue before? Thanks Y’all Read More
Committing using ‘Commit’ button in Project tab is so slow
Hi all,
Say I am working on a project-enabled git repo which gives me the Project tab whenever I open my *.prj file. Everything works fine and all, until when it’s time for me to commit my changes. Let’s say I wanna commit all changes, so logically I would use the ‘Commit’ button in the Project tab:
Eventhough it is just small changes, it takes almost a minute to for the committing to complete! This is shown by this rotating circle progress indicator ‘Checking in files’:
In contrast, if I were to commit the files individually using the right-click context menu like this:
It takes less than a second! Why is this, and if this is a bug, please fix it since committing using the button is convenient to commit all changes at once.
Thank you!Hi all,
Say I am working on a project-enabled git repo which gives me the Project tab whenever I open my *.prj file. Everything works fine and all, until when it’s time for me to commit my changes. Let’s say I wanna commit all changes, so logically I would use the ‘Commit’ button in the Project tab:
Eventhough it is just small changes, it takes almost a minute to for the committing to complete! This is shown by this rotating circle progress indicator ‘Checking in files’:
In contrast, if I were to commit the files individually using the right-click context menu like this:
It takes less than a second! Why is this, and if this is a bug, please fix it since committing using the button is convenient to commit all changes at once.
Thank you! Hi all,
Say I am working on a project-enabled git repo which gives me the Project tab whenever I open my *.prj file. Everything works fine and all, until when it’s time for me to commit my changes. Let’s say I wanna commit all changes, so logically I would use the ‘Commit’ button in the Project tab:
Eventhough it is just small changes, it takes almost a minute to for the committing to complete! This is shown by this rotating circle progress indicator ‘Checking in files’:
In contrast, if I were to commit the files individually using the right-click context menu like this:
It takes less than a second! Why is this, and if this is a bug, please fix it since committing using the button is convenient to commit all changes at once.
Thank you! matlab, project, git, commit MATLAB Answers — New Questions
Matlab Code for Performance Analysis (BER vs Eb_N0) of BPSK, QPSK & 16QAM, on 4G LTE
Please can someone kindly help to edit this code i got from Nischay Malhan (youtube account) to fit in for BER performance evaluation of bpsk, qpsk and 16qam on 4G LTE. Thank you you assist.
The code below:
clc;
close all;
EbN0dB=-4:1:24;
EbN0lin=10.^(EbN0dB/10);
colors={‘k-*’,’g-o’,’r-h’,’c-s’,’m-s’,’y-*’,’k-p’,’b:s’,’m:d’,’g:p’};
index=1;
%BPSK
BPSK = 0.5*erfc(sqrt(EbN0lin));
plotHandle=plot(EbN0dB,log10(BPSK),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
hold on;
index=index+1;
%M-PSK
m=2:1:5;
M=2.^m;
for i=M,
k=log2(i);
berErr = 1/k*erfc(sqrt(EbN0lin*k)*sin(pi/i));
plotHandle=plot(EbN0dB,log10(berErr),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
index=index+1;
end
%Binary DPSK
Pb = 0.5*exp(-EbN0lin);
plotHandle = plot(EbN0dB,log10(Pb),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
index=index+1;
%Differential QPSK
a=sqrt(2*EbN0lin*(1-sqrt(1/2)));
b=sqrt(2*EbN0lin*(1+sqrt(1/2)));
Pb = marcumq(a,b)-1/2.*besseli(0,a.*b).*exp(-1/2*(a.^2+b.^2));
plotHandle = plot(EbN0dB,log10(Pb),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
index=index+1;
%M-QAM
m=2:2:6;
M=2.^m;
for i=M,
k=log2(i);
berErr = 2/k*(1-1/sqrt(i))*erfc(sqrt(3*EbN0lin*k/(2*(i-1))));
plotHandle=plot(EbN0dB,log10(berErr),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
index=index+1;
end
legend(‘BPSK’,’QPSK’,’8-PSK’,’16-PSK’,’32-PSK’,’D-BPSK’,’D-QPSK’,’4-QAM’,’16-QAM’,’64-QAM’);
axis([-4 24 -8 0]);
set(gca,’XTick’,-4:1:24);
ylabel(‘Probability of BER Error – log10(Pb)’);
xlabel(‘Eb/N0 (dB)’);
title(‘Probability of BER Error log10(Pb) Vs Eb/N0’);
grid on;Please can someone kindly help to edit this code i got from Nischay Malhan (youtube account) to fit in for BER performance evaluation of bpsk, qpsk and 16qam on 4G LTE. Thank you you assist.
The code below:
clc;
close all;
EbN0dB=-4:1:24;
EbN0lin=10.^(EbN0dB/10);
colors={‘k-*’,’g-o’,’r-h’,’c-s’,’m-s’,’y-*’,’k-p’,’b:s’,’m:d’,’g:p’};
index=1;
%BPSK
BPSK = 0.5*erfc(sqrt(EbN0lin));
plotHandle=plot(EbN0dB,log10(BPSK),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
hold on;
index=index+1;
%M-PSK
m=2:1:5;
M=2.^m;
for i=M,
k=log2(i);
berErr = 1/k*erfc(sqrt(EbN0lin*k)*sin(pi/i));
plotHandle=plot(EbN0dB,log10(berErr),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
index=index+1;
end
%Binary DPSK
Pb = 0.5*exp(-EbN0lin);
plotHandle = plot(EbN0dB,log10(Pb),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
index=index+1;
%Differential QPSK
a=sqrt(2*EbN0lin*(1-sqrt(1/2)));
b=sqrt(2*EbN0lin*(1+sqrt(1/2)));
Pb = marcumq(a,b)-1/2.*besseli(0,a.*b).*exp(-1/2*(a.^2+b.^2));
plotHandle = plot(EbN0dB,log10(Pb),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
index=index+1;
%M-QAM
m=2:2:6;
M=2.^m;
for i=M,
k=log2(i);
berErr = 2/k*(1-1/sqrt(i))*erfc(sqrt(3*EbN0lin*k/(2*(i-1))));
plotHandle=plot(EbN0dB,log10(berErr),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
index=index+1;
end
legend(‘BPSK’,’QPSK’,’8-PSK’,’16-PSK’,’32-PSK’,’D-BPSK’,’D-QPSK’,’4-QAM’,’16-QAM’,’64-QAM’);
axis([-4 24 -8 0]);
set(gca,’XTick’,-4:1:24);
ylabel(‘Probability of BER Error – log10(Pb)’);
xlabel(‘Eb/N0 (dB)’);
title(‘Probability of BER Error log10(Pb) Vs Eb/N0’);
grid on; Please can someone kindly help to edit this code i got from Nischay Malhan (youtube account) to fit in for BER performance evaluation of bpsk, qpsk and 16qam on 4G LTE. Thank you you assist.
The code below:
clc;
close all;
EbN0dB=-4:1:24;
EbN0lin=10.^(EbN0dB/10);
colors={‘k-*’,’g-o’,’r-h’,’c-s’,’m-s’,’y-*’,’k-p’,’b:s’,’m:d’,’g:p’};
index=1;
%BPSK
BPSK = 0.5*erfc(sqrt(EbN0lin));
plotHandle=plot(EbN0dB,log10(BPSK),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
hold on;
index=index+1;
%M-PSK
m=2:1:5;
M=2.^m;
for i=M,
k=log2(i);
berErr = 1/k*erfc(sqrt(EbN0lin*k)*sin(pi/i));
plotHandle=plot(EbN0dB,log10(berErr),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
index=index+1;
end
%Binary DPSK
Pb = 0.5*exp(-EbN0lin);
plotHandle = plot(EbN0dB,log10(Pb),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
index=index+1;
%Differential QPSK
a=sqrt(2*EbN0lin*(1-sqrt(1/2)));
b=sqrt(2*EbN0lin*(1+sqrt(1/2)));
Pb = marcumq(a,b)-1/2.*besseli(0,a.*b).*exp(-1/2*(a.^2+b.^2));
plotHandle = plot(EbN0dB,log10(Pb),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
index=index+1;
%M-QAM
m=2:2:6;
M=2.^m;
for i=M,
k=log2(i);
berErr = 2/k*(1-1/sqrt(i))*erfc(sqrt(3*EbN0lin*k/(2*(i-1))));
plotHandle=plot(EbN0dB,log10(berErr),char(colors(index)));
set(plotHandle,’LineWidth’,1.5);
index=index+1;
end
legend(‘BPSK’,’QPSK’,’8-PSK’,’16-PSK’,’32-PSK’,’D-BPSK’,’D-QPSK’,’4-QAM’,’16-QAM’,’64-QAM’);
axis([-4 24 -8 0]);
set(gca,’XTick’,-4:1:24);
ylabel(‘Probability of BER Error – log10(Pb)’);
xlabel(‘Eb/N0 (dB)’);
title(‘Probability of BER Error log10(Pb) Vs Eb/N0’);
grid on; matlab code for performance analysis (ber vs eb_n0) if digital modulation schemes. MATLAB Answers — New Questions
The indices for validation and test sets are not being assigned correctly by ‘divideind’
I am new in matlab and I am trying to use ‘divideind’ to divide my data in order, but unfortunately it gives me this:
trainInd: [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 … ] (1×1418 double)
valInd: [1×0 double]
testInd: [1×0 double]
I would appreciate it if you tell me where is the problem?
this is my code:
X = data.inputs;
% Define the dependent variable
y = data.output;
Q = length(y);
% Define the split points
train_end = 1418;
val_end = 1773;
test_end = Q;
% Assign the indices
train_indices = 1:train_end;
val_indices = (train_end + 1):val_end;
test_indices = (val_end + 1):test_end;
% Use divideind to ensure proper division
[train_indices,val_indices,test_indices] = divideind(Q,train_indices,val_indices,test_indices);
% Divide the data into training and testing sets
x_train = log(X(train_indices, :));
x_valid = log(X(val_indices, :));
x_test = log(X(test_indices, :));
y_train = log(y(train_indices));
y_valid = log(y(val_indices));
y_test = log(y(test_indices));
% Transpose the data to fit the input format of the neural network
inputs_train = x_train’;
outputs_train = y_train’;
inputs_validation = x_valid’ ;
outputs_valid = y_valid’;
inputs_test = x_test’;
outputs_test = y_test’;
% Initialize arrays to store RMSE values
train_rmse = zeros(1, 10);
Valid_rmse = zeros(1, 10);
test_rmse = zeros(1, 10);
for i = 1:10
hiddenLayerSize = [i, i];
net = fitnet(hiddenLayerSize, ‘trainlm’);
net.trainParam.epochs = 200;
net.layers{1}.transferFcn = ‘poslin’;
net.layers{2}.transferFcn = ‘logsig’;
net.divideFcn = ‘divideind’;
net.divideMode = ‘sample’;
net.divideParam.trainInd = train_indices;
net.divideParam.valInd = val_indices;
net.divideParam.testInd = test_indices;
[net,tr] = train(net, inputs_train, outputs_train);
% Predict on training data
train_predictions = exp(net(inputs_train(:,tr.trainInd)));
yTrainTrue = exp(outputs_train(:,tr.trainInd));
train_rmse(i) = sqrt(mean((train_predictions – yTrainTrue).^2));
% Predict on Validation data
Valid_predictions = exp(net(inputs_validation(:,tr.valInd)));
yValTrue = exp(outputs_valid(:,tr.valInd));
Valid_rmse(i) = sqrt(mean((Valid_predictions – yValTrue).^2));
% Predict on Validation data
test_predictions = exp(net(inputs_test(:,tr.testInd)));
yTestTrue = exp(outputs_test(:,tr.testInd));
test_rmse(i) = sqrt(mean((test_predictions – yTestTrue).^2));
endI am new in matlab and I am trying to use ‘divideind’ to divide my data in order, but unfortunately it gives me this:
trainInd: [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 … ] (1×1418 double)
valInd: [1×0 double]
testInd: [1×0 double]
I would appreciate it if you tell me where is the problem?
this is my code:
X = data.inputs;
% Define the dependent variable
y = data.output;
Q = length(y);
% Define the split points
train_end = 1418;
val_end = 1773;
test_end = Q;
% Assign the indices
train_indices = 1:train_end;
val_indices = (train_end + 1):val_end;
test_indices = (val_end + 1):test_end;
% Use divideind to ensure proper division
[train_indices,val_indices,test_indices] = divideind(Q,train_indices,val_indices,test_indices);
% Divide the data into training and testing sets
x_train = log(X(train_indices, :));
x_valid = log(X(val_indices, :));
x_test = log(X(test_indices, :));
y_train = log(y(train_indices));
y_valid = log(y(val_indices));
y_test = log(y(test_indices));
% Transpose the data to fit the input format of the neural network
inputs_train = x_train’;
outputs_train = y_train’;
inputs_validation = x_valid’ ;
outputs_valid = y_valid’;
inputs_test = x_test’;
outputs_test = y_test’;
% Initialize arrays to store RMSE values
train_rmse = zeros(1, 10);
Valid_rmse = zeros(1, 10);
test_rmse = zeros(1, 10);
for i = 1:10
hiddenLayerSize = [i, i];
net = fitnet(hiddenLayerSize, ‘trainlm’);
net.trainParam.epochs = 200;
net.layers{1}.transferFcn = ‘poslin’;
net.layers{2}.transferFcn = ‘logsig’;
net.divideFcn = ‘divideind’;
net.divideMode = ‘sample’;
net.divideParam.trainInd = train_indices;
net.divideParam.valInd = val_indices;
net.divideParam.testInd = test_indices;
[net,tr] = train(net, inputs_train, outputs_train);
% Predict on training data
train_predictions = exp(net(inputs_train(:,tr.trainInd)));
yTrainTrue = exp(outputs_train(:,tr.trainInd));
train_rmse(i) = sqrt(mean((train_predictions – yTrainTrue).^2));
% Predict on Validation data
Valid_predictions = exp(net(inputs_validation(:,tr.valInd)));
yValTrue = exp(outputs_valid(:,tr.valInd));
Valid_rmse(i) = sqrt(mean((Valid_predictions – yValTrue).^2));
% Predict on Validation data
test_predictions = exp(net(inputs_test(:,tr.testInd)));
yTestTrue = exp(outputs_test(:,tr.testInd));
test_rmse(i) = sqrt(mean((test_predictions – yTestTrue).^2));
end I am new in matlab and I am trying to use ‘divideind’ to divide my data in order, but unfortunately it gives me this:
trainInd: [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 … ] (1×1418 double)
valInd: [1×0 double]
testInd: [1×0 double]
I would appreciate it if you tell me where is the problem?
this is my code:
X = data.inputs;
% Define the dependent variable
y = data.output;
Q = length(y);
% Define the split points
train_end = 1418;
val_end = 1773;
test_end = Q;
% Assign the indices
train_indices = 1:train_end;
val_indices = (train_end + 1):val_end;
test_indices = (val_end + 1):test_end;
% Use divideind to ensure proper division
[train_indices,val_indices,test_indices] = divideind(Q,train_indices,val_indices,test_indices);
% Divide the data into training and testing sets
x_train = log(X(train_indices, :));
x_valid = log(X(val_indices, :));
x_test = log(X(test_indices, :));
y_train = log(y(train_indices));
y_valid = log(y(val_indices));
y_test = log(y(test_indices));
% Transpose the data to fit the input format of the neural network
inputs_train = x_train’;
outputs_train = y_train’;
inputs_validation = x_valid’ ;
outputs_valid = y_valid’;
inputs_test = x_test’;
outputs_test = y_test’;
% Initialize arrays to store RMSE values
train_rmse = zeros(1, 10);
Valid_rmse = zeros(1, 10);
test_rmse = zeros(1, 10);
for i = 1:10
hiddenLayerSize = [i, i];
net = fitnet(hiddenLayerSize, ‘trainlm’);
net.trainParam.epochs = 200;
net.layers{1}.transferFcn = ‘poslin’;
net.layers{2}.transferFcn = ‘logsig’;
net.divideFcn = ‘divideind’;
net.divideMode = ‘sample’;
net.divideParam.trainInd = train_indices;
net.divideParam.valInd = val_indices;
net.divideParam.testInd = test_indices;
[net,tr] = train(net, inputs_train, outputs_train);
% Predict on training data
train_predictions = exp(net(inputs_train(:,tr.trainInd)));
yTrainTrue = exp(outputs_train(:,tr.trainInd));
train_rmse(i) = sqrt(mean((train_predictions – yTrainTrue).^2));
% Predict on Validation data
Valid_predictions = exp(net(inputs_validation(:,tr.valInd)));
yValTrue = exp(outputs_valid(:,tr.valInd));
Valid_rmse(i) = sqrt(mean((Valid_predictions – yValTrue).^2));
% Predict on Validation data
test_predictions = exp(net(inputs_test(:,tr.testInd)));
yTestTrue = exp(outputs_test(:,tr.testInd));
test_rmse(i) = sqrt(mean((test_predictions – yTestTrue).^2));
end divideind, ann, split data MATLAB Answers — New Questions
Dev Channel update to 127.0.2610.3 is live.
Hello Insiders! We released 127.0.2610.3 to the Dev channel! This includes numerous fixes. For more details on the changes, check out the highlights below.
Introducing Copilot+ PCs – The Official Microsoft Blog
Microsoft Edge for Business: Secure, productive, optimized for AI – YouTube
Added Features:
Implemented a feature to include an icon accompanied by a tooltip to clarify why certain settings are inaccessible.
Improved Reliability:
Fixed a browser crash on android.
Resolved an issue when clicking the ‘Organize tabs’ button under tabs action menu caused browser to crash.
Fixed an issue causing the browser to crash upon clicking the ‘Switch’ button while awaiting the URL to load.
Resolved a bug that led to the browser crashing when closed while captions were running.
Resolved a bug that led to the browser crashing when duplicating the last tab in the tab strip through the tab group menu.
Changed Behavior:
Resolved a problem where the tooltip for the tab group header was appearing over the hover menu.
Resolved an issue that caused the extension’s updated details to display incorrectly on the detail page.
Resolved an issue when dragging a tab group containing the active tab and dropping it onto another group resulted in multiple tabs being added to the group.
Fixed an issue that resulted in insufficient spacing between tabs and other buttons.
Fixed an issue where the mouse gesture would close the entire tab instead of just the split-screen tab.
Fixed an issue where the New Tab Button at the bottom of the vertical tabs view was not aligned correctly with the other items.
Mac: Resolved an issue that resulted in the ‘alt’ attribute being incorrectly shown on macOS.
iOS: Fixed an issue that caused a disruption in the full-page user interface, where a gap appeared between the QR code and chat content on iOS.
Android:
Resolved a problem that caused the toolbar to vanish when altering the display mode on android.
Fixed an issue where selecting ‘Delete browsing data’ would navigate back to the previous page.
See an issue that you think might be a bug? Remember to send that directly through the in-app feedback by heading to the … menu > Help and feedback > Send feedback and include diagnostics so the team can investigate.
Thanks again for sending us feedback and helping us improve our Insider builds.
~Gouri
Hello Insiders! We released 127.0.2610.3 to the Dev channel! This includes numerous fixes. For more details on the changes, check out the highlights below.
Introducing Copilot+ PCs – The Official Microsoft Blog
Microsoft Edge for Business: Secure, productive, optimized for AI – YouTube
Added Features:
Implemented a feature to include an icon accompanied by a tooltip to clarify why certain settings are inaccessible.
Improved Reliability:
Fixed a browser crash on android.
Resolved an issue when clicking the ‘Organize tabs’ button under tabs action menu caused browser to crash.
Fixed an issue causing the browser to crash upon clicking the ‘Switch’ button while awaiting the URL to load.
Resolved a bug that led to the browser crashing when closed while captions were running.
Resolved a bug that led to the browser crashing when duplicating the last tab in the tab strip through the tab group menu.
Changed Behavior:
Resolved a problem where the tooltip for the tab group header was appearing over the hover menu.
Resolved an issue that caused the extension’s updated details to display incorrectly on the detail page.
Resolved an issue when dragging a tab group containing the active tab and dropping it onto another group resulted in multiple tabs being added to the group.
Fixed an issue that resulted in insufficient spacing between tabs and other buttons.
Fixed an issue where the mouse gesture would close the entire tab instead of just the split-screen tab.
Fixed an issue where the New Tab Button at the bottom of the vertical tabs view was not aligned correctly with the other items.
Mac: Resolved an issue that resulted in the ‘alt’ attribute being incorrectly shown on macOS.
iOS: Fixed an issue that caused a disruption in the full-page user interface, where a gap appeared between the QR code and chat content on iOS.
Android:
Resolved a problem that caused the toolbar to vanish when altering the display mode on android.
Fixed an issue where selecting ‘Delete browsing data’ would navigate back to the previous page.
See an issue that you think might be a bug? Remember to send that directly through the in-app feedback by heading to the … menu > Help and feedback > Send feedback and include diagnostics so the team can investigate.
Thanks again for sending us feedback and helping us improve our Insider builds.
~Gouri Read More
how to get MTF from PSF
Hi guys,
Can you please tell me how can I get MTF from the PSF. PSF is the matrix of 400X400 taken from the camera. Please see attached mat file.
Thank you very much.Hi guys,
Can you please tell me how can I get MTF from the PSF. PSF is the matrix of 400X400 taken from the camera. Please see attached mat file.
Thank you very much. Hi guys,
Can you please tell me how can I get MTF from the PSF. PSF is the matrix of 400X400 taken from the camera. Please see attached mat file.
Thank you very much. psf, mtf MATLAB Answers — New Questions
Are there any examples of using Transformers for Time Series?
Good afternoon All,
I’m researching how to develop/train/use Transformers (those similar to GPT) for S&P 500 historical data as an example. It seems like Transformers are mainly used for NLP but there are articles out there that utilize them for time series. Can any fellow lead the way in how could I get started in doing these in MATLAB? I have done general things like convolutions, LSTMs, etc. but not on a transformers caliber with the DL Toolbox.
I found this MATLAB package (pasted below) to be somewhat useful but it seems to lean more into language rather than historical data points.
https://www.mathworks.com/matlabcentral/fileexchange/107375-transformer-models
Another side question: It’s possibe to use the Deep Network Designer app to layout a transformers architecture?
Any tip is appreciated.
Thank you,
YerayGood afternoon All,
I’m researching how to develop/train/use Transformers (those similar to GPT) for S&P 500 historical data as an example. It seems like Transformers are mainly used for NLP but there are articles out there that utilize them for time series. Can any fellow lead the way in how could I get started in doing these in MATLAB? I have done general things like convolutions, LSTMs, etc. but not on a transformers caliber with the DL Toolbox.
I found this MATLAB package (pasted below) to be somewhat useful but it seems to lean more into language rather than historical data points.
https://www.mathworks.com/matlabcentral/fileexchange/107375-transformer-models
Another side question: It’s possibe to use the Deep Network Designer app to layout a transformers architecture?
Any tip is appreciated.
Thank you,
Yeray Good afternoon All,
I’m researching how to develop/train/use Transformers (those similar to GPT) for S&P 500 historical data as an example. It seems like Transformers are mainly used for NLP but there are articles out there that utilize them for time series. Can any fellow lead the way in how could I get started in doing these in MATLAB? I have done general things like convolutions, LSTMs, etc. but not on a transformers caliber with the DL Toolbox.
I found this MATLAB package (pasted below) to be somewhat useful but it seems to lean more into language rather than historical data points.
https://www.mathworks.com/matlabcentral/fileexchange/107375-transformer-models
Another side question: It’s possibe to use the Deep Network Designer app to layout a transformers architecture?
Any tip is appreciated.
Thank you,
Yeray deep learning, ai, transformers, gpt MATLAB Answers — New Questions
Problem with polyfit command (R2015a)
Below is a small script for using the polyfit command but surprisingly the last command gives me a completely wrong polynomial p. I don’t understand why. Thanks in advance for your help.
Below the script is the response from my version of MATLAB (R2015a).
%————————————————————————————————————–
%butta_sto_test
%
clear all
clc
x=[1:9]
y=[5,6,10,20,28,33,34,36,42]
p=polyfit(x,y,1)
[p,S]=polyfit(x,y,1)
[p,S,mu]=polyfit(x,y,1)
%———————————————————————————————————————-
x =
1 2 3 4 5 6 7 8 9
y =
5 6 10 20 28 33 34 36 42
p =
4.9833 -1.1389
p =
4.9833 -1.1389
S =
R: [2×2 double]
df: 7
normr: 8.4581
p =
13.6474 23.7778
S =
R: [2×2 double]
df: 7
normr: 8.4581
mu =
5.0000
2.7386Below is a small script for using the polyfit command but surprisingly the last command gives me a completely wrong polynomial p. I don’t understand why. Thanks in advance for your help.
Below the script is the response from my version of MATLAB (R2015a).
%————————————————————————————————————–
%butta_sto_test
%
clear all
clc
x=[1:9]
y=[5,6,10,20,28,33,34,36,42]
p=polyfit(x,y,1)
[p,S]=polyfit(x,y,1)
[p,S,mu]=polyfit(x,y,1)
%———————————————————————————————————————-
x =
1 2 3 4 5 6 7 8 9
y =
5 6 10 20 28 33 34 36 42
p =
4.9833 -1.1389
p =
4.9833 -1.1389
S =
R: [2×2 double]
df: 7
normr: 8.4581
p =
13.6474 23.7778
S =
R: [2×2 double]
df: 7
normr: 8.4581
mu =
5.0000
2.7386 Below is a small script for using the polyfit command but surprisingly the last command gives me a completely wrong polynomial p. I don’t understand why. Thanks in advance for your help.
Below the script is the response from my version of MATLAB (R2015a).
%————————————————————————————————————–
%butta_sto_test
%
clear all
clc
x=[1:9]
y=[5,6,10,20,28,33,34,36,42]
p=polyfit(x,y,1)
[p,S]=polyfit(x,y,1)
[p,S,mu]=polyfit(x,y,1)
%———————————————————————————————————————-
x =
1 2 3 4 5 6 7 8 9
y =
5 6 10 20 28 33 34 36 42
p =
4.9833 -1.1389
p =
4.9833 -1.1389
S =
R: [2×2 double]
df: 7
normr: 8.4581
p =
13.6474 23.7778
S =
R: [2×2 double]
df: 7
normr: 8.4581
mu =
5.0000
2.7386 polyfit MATLAB Answers — New Questions
Teams Adoption Collateral
Hi all!
I know I’ve seen some good Teams Adoption resources in the Champions community before but I can’t locate them. I have a colleague whose company is transitioning to Teams (from Zoom) and is looking for any helpful resources we can share. Appreciate your help!
Hi all! I know I’ve seen some good Teams Adoption resources in the Champions community before but I can’t locate them. I have a colleague whose company is transitioning to Teams (from Zoom) and is looking for any helpful resources we can share. Appreciate your help! Read More
Excel conditional formatting
Hi all!
Im having a tough time figuring this one out. I usually use conditional formatting to find unique entries between two columns, however I now need them to be date specific. I want it to flag if it is unique per day.
I am reconciling between what we have on the books and what our statement says and there are some common charges that I don’t want being considered duplicate unless there was a charge for that on the same date as our records indicate.
thoughts?
Hi all!Im having a tough time figuring this one out. I usually use conditional formatting to find unique entries between two columns, however I now need them to be date specific. I want it to flag if it is unique per day. I am reconciling between what we have on the books and what our statement says and there are some common charges that I don’t want being considered duplicate unless there was a charge for that on the same date as our records indicate. thoughts? Read More
Windows server 2025 public preview 26100 versus preview build 26227
I was under the impression that a public preview was almost as good as an RTM. Now I am seeing a new preview build that supersedes the public preview? I am on the public preview. Will it automatically update to these new preview builds?
I was under the impression that a public preview was almost as good as an RTM. Now I am seeing a new preview build that supersedes the public preview? I am on the public preview. Will it automatically update to these new preview builds? Read More
Azure AI Search Database Selection: Optimizing Performance and Scalability for Your Business
In today’s data-driven world, selecting the right database for your specific use case is crucial for optimizing performance, ensuring scalability, and maintaining security. Azure AI Search, combined with Azure OpenAI and the Retrieval Augmented Generation (RAG) pattern, provides a powerful framework for building advanced generative AI applications. These solutions are tailored to meet diverse needs across different industries. In this blog, we’ll explore the use cases for various databases available through Azure AI Search and highlight their applications in real-world scenarios across different verticals such as nonprofits, healthcare, financial services, retail, automotive, and more.
Decision-Making Flowchart
To assist in selecting the most suitable database for your specific needs, refer to the Database Selection Flowchart below. This guide helps determine the optimal database solution provided by Azure AI Search based on your unique use case requirements, particularly in the context of RAG applications supported by Azure OpenAI.
Decision Points
To effectively manage diverse data types and meet varying organizational needs, Azure AI Search provides a range of database solutions. Each database type is tailored to specific use cases, ensuring optimal performance, scalability, and security. The decision points below will guide you in selecting the most suitable database for your needs based on your data structure, access patterns, and application requirements.
Simple, Scalable Storage for Unstructured Data
Azure Storage Accounts: Ideal for cost-effective storage of unstructured data. Nonprofits and conservation organizations, for instance, often deal with vast amounts of documents and media files that need scalable and economical storage solutions. Azure Storage Accounts provide a reliable way to store and access these files, supporting the efficient management of data without breaking the budget.
Relational Database with Built-in Intelligence, Scalability, and Security
Azure SQL Database: A fully managed relational database with built-in intelligence, scalability, and security features. This is particularly useful for financial services that require robust security and compliance, as well as healthcare organizations managing patient records and clinical data. Azure SQL Database ensures that data is stored securely and can be scaled according to the organization’s needs, offering automated backups, threat detection, and other advanced features to maintain data integrity and security.
Highly Structured and Fixed Schema with Strong Transactional Consistency
PostgreSQL: Suitable for applications requiring strong transactional consistency and data integrity, such as financial applications, healthcare records, and any other use case where data accuracy and reliability are paramount. PostgreSQL is known for its robust transactional support, ensuring that data modifications are handled reliably and consistently, which is crucial for applications that need to maintain strict data accuracy.
Flexible Schema and Handle Large Volumes, High Availability, Global Distribution
Cosmos DB: Best for real-time analytics, IoT, and e-commerce applications needing rapid data access and global distribution. Retail and automotive industries can benefit from Cosmos DB for managing inventory, tracking products, and processing large volumes of data from connected devices. Cosmos DB supports multiple data models, offers low-latency access to data, and ensures high availability, making it an excellent choice for applications requiring flexible and scalable data management.
Complex Queries with Data Relationships
Cosmos DB for MongoDB vCore: Perfect for content management systems and document databases requiring complex queries and dynamic schemas. Organizations in sectors like publishing, media, and content management can leverage this to handle complex relationships between different data types. Cosmos DB for MongoDB vCore provides the ability to perform sophisticated queries on data, supporting applications that need to manage and retrieve interrelated data efficiently.
High-Speed Data Access
Redis: Optimal for caching, session storage, and real-time analytics needing quick data retrieval and processing. Retailers can use Redis to manage customer sessions and provide real-time recommendations, while automotive companies can leverage it for real-time vehicle data processing. Redis is designed for high-performance data access, making it ideal for applications where speed is critical, such as real-time data analytics and dynamic user experiences.
This refined approach ensures that each database type is matched with its ideal use case, highlighting the strengths and capabilities that make Azure AI Search a powerful tool for diverse industry needs.
Additional Features
Vector Search Integration: Enhances search relevance using embeddings for advanced AI applications (learn more about vector search).
Hybrid Search: Combines keyword and vector search for comprehensive results.
Integration with Azure Services: Leverage Azure Blob Storage, Azure SQL, and Cosmos DB for better data processing and indexing.
Security and Compliance: Ensure adherence to data protection standards.
Real-World Use Cases by Industry
To illustrate the practical applications and benefits of Azure AI Search across different sectors, let’s explore specific use cases in various industries. By leveraging the diverse database solutions provided by Azure AI Search and Azure OpenAI, organizations can enhance their data management strategies, ensuring optimal performance, scalability, and security.
Nonprofits
Nonprofits, such as foundations and conservation organizations, often manage vast amounts of unstructured data, including documents, images, videos, and Geographic Information Systems (GIS) data. Azure Storage Accounts provide a scalable and cost-effective solution for storing this diverse data securely. These organizations can use Cosmos DB for global data distribution, ensuring critical information is accessible to stakeholders worldwide, enhancing collaboration and operational efficiency.
For managing GIS data, Azure SQL Database can handle spatial data, perform complex geospatial queries, and integrate with various mapping tools, enabling nonprofits to make data-driven decisions for environmental conservation or urban planning. Additionally, Azure AI Search can be utilized to index and search across all this data, providing powerful search capabilities that help users quickly find the information they need, whether it’s text, images, or GIS data. This capability can significantly improve data accessibility and utilization in various nonprofit projects and initiatives.
Healthcare
Healthcare applications require robust databases to handle structured data with high transactional consistency and integrity. Azure SQL Database and PostgreSQL are ideal for managing patient records, clinical data, and ensuring compliance with stringent health regulations. Azure AI Search enhances the organization and retrieval of this critical data, allowing healthcare providers to quickly access and analyze patient information, thus improving patient care and operational efficiency. AI-powered search capabilities can help in identifying patterns, supporting diagnostics, and personalizing patient care.
Financial Services
In the financial sector, data accuracy and reliability are paramount. PostgreSQL is often chosen for its strong transactional consistency and data integrity, making it suitable for managing sensitive financial data and transactions. Azure SQL Database offers robust security features, ensuring compliance with financial regulations and protecting against data breaches. Financial institutions can leverage Azure AI Search to process transactions efficiently, support complex financial models, and provide real-time data analytics, enhancing decision-making and operational performance.
Retail
Retailers leverage Cosmos DB to manage large volumes of data, ensuring high availability and global distribution. This flexibility allows for efficient inventory management, real-time analytics, and personalized customer experiences. Azure AI Search capabilities enable retailers to quickly retrieve relevant data, improving the shopping experience by offering personalized product suggestions based on customer behavior and preferences. Redis is used to manage customer sessions and provide real-time recommendations, ensuring a seamless and engaging shopping experience.
Automotive
The automotive industry benefits from Cosmos DB’s ability to handle large volumes of IoT data from connected vehicles. Real-time data processing is crucial for vehicle telematics, predictive maintenance, and autonomous driving technologies. Automotive companies can use Cosmos DB to store and analyze data from sensors in vehicles, enabling real-time diagnostics and proactive maintenance alerts. Azure AI Search enhances these capabilities by enabling quick retrieval and analysis of vast amounts of data. Redis can be used for real-time data caching and quick retrieval, supporting applications that require immediate access to vehicle data, such as navigation systems and driver assistance features.
Conclusion
Azure AI Search, combined with Azure OpenAI and the RAG pattern, offers a comprehensive suite of database solutions tailored to meet the diverse needs of various industries. By leveraging the Database Selection Flowchart and understanding the specific use cases of each database, organizations can optimize their data management strategies to achieve better performance, scalability, and security. With additional features like vector search integration (learn more about vector search), hybrid search, and seamless integration with Azure services, Azure AI Search stands out as a powerful tool for modern data-driven applications. Whether you’re in healthcare, financial services, retail, automotive, or a nonprofit organization, Azure AI Search has the right database solution to support your data needs and drive your digital transformation forward.
For more information about Azure AI Search and its latest features, visit the Microsoft Learn and Microsoft Tech Community.
If you have any questions or need further assistance in selecting the right database for your use case, feel free to reach out to us. We’re here to help you make the best decision for your data needs.
Microsoft Tech Community – Latest Blogs –Read More
I have a PSF code and I need to generate the MTF and plot it along with the spatial frequency graph, similar to the image attached. I would greatly appreciate your assistance
% Imaging with Zone Plate
for tt=1:1
z2 = s2+s2/5000*tt;
h2 = exp(1i*2*pi*z2*sqrt(1/(lambda)^2-(x/L).^2-(y/L).^2));
E2 = ifft2(fftshift(fftshift(fft2(E.*exp(1i*FZP))).*h2));
psf=fftshift(fft2(exp(1i*FZP)));
resulting_image = abs(E2).^2;
figure(200+tt)
imagesc(abs(E2).^2);
title(‘resulting_image’)
axis square;
I need assistance in calculating MTFfrom PSF, plotting MTF vs spatial frequency graph, and calculating the Strehl ratio. I am a beginner and have been struggling with this for a long time. Your help would be greatly appreciated.% Imaging with Zone Plate
for tt=1:1
z2 = s2+s2/5000*tt;
h2 = exp(1i*2*pi*z2*sqrt(1/(lambda)^2-(x/L).^2-(y/L).^2));
E2 = ifft2(fftshift(fftshift(fft2(E.*exp(1i*FZP))).*h2));
psf=fftshift(fft2(exp(1i*FZP)));
resulting_image = abs(E2).^2;
figure(200+tt)
imagesc(abs(E2).^2);
title(‘resulting_image’)
axis square;
I need assistance in calculating MTFfrom PSF, plotting MTF vs spatial frequency graph, and calculating the Strehl ratio. I am a beginner and have been struggling with this for a long time. Your help would be greatly appreciated. % Imaging with Zone Plate
for tt=1:1
z2 = s2+s2/5000*tt;
h2 = exp(1i*2*pi*z2*sqrt(1/(lambda)^2-(x/L).^2-(y/L).^2));
E2 = ifft2(fftshift(fftshift(fft2(E.*exp(1i*FZP))).*h2));
psf=fftshift(fft2(exp(1i*FZP)));
resulting_image = abs(E2).^2;
figure(200+tt)
imagesc(abs(E2).^2);
title(‘resulting_image’)
axis square;
I need assistance in calculating MTFfrom PSF, plotting MTF vs spatial frequency graph, and calculating the Strehl ratio. I am a beginner and have been struggling with this for a long time. Your help would be greatly appreciated. mtf, psf MATLAB Answers — New Questions
How can I customize a built-in function “HelperOrientationViewer()”
I’m trying to get the real-time orientation of the IMU9250 sensor by following the documentation: "Estimating Orientation Using Inertial Sensor Fusion and MPU-9250"
Can I customize the HelperOrientationViewer() function? I want to add another 3D object to the 3D plot. I also want to change the normal 3D object to another mesh STL object. and I want to change the scale of each axis to be more bigger. How can I do these?
I tryed to use poseplot() function, but it is too slow comparing to HelperOrientationViewer() functionI’m trying to get the real-time orientation of the IMU9250 sensor by following the documentation: "Estimating Orientation Using Inertial Sensor Fusion and MPU-9250"
Can I customize the HelperOrientationViewer() function? I want to add another 3D object to the 3D plot. I also want to change the normal 3D object to another mesh STL object. and I want to change the scale of each axis to be more bigger. How can I do these?
I tryed to use poseplot() function, but it is too slow comparing to HelperOrientationViewer() function I’m trying to get the real-time orientation of the IMU9250 sensor by following the documentation: "Estimating Orientation Using Inertial Sensor Fusion and MPU-9250"
Can I customize the HelperOrientationViewer() function? I want to add another 3D object to the 3D plot. I also want to change the normal 3D object to another mesh STL object. and I want to change the scale of each axis to be more bigger. How can I do these?
I tryed to use poseplot() function, but it is too slow comparing to HelperOrientationViewer() function arduino, sensor fusion, helperorientationviewer, imu9250, graphics, poseplot MATLAB Answers — New Questions
How to stop quadratic formula calculator from giving inverse outputs?
Hi, I’m doing a worksheet based around matlab which involved solving quadratic formulas. I probably overcomplicated it and now made a calculator that keeps giving the inverse of my expected answer, could anyone help please?
for k = 1 : 7
disp ( ‘ For the equation ax^2 + bx + c ‘ )
a = input ( ‘ Enter a; ‘ );
b = input ( ‘ Enter b; ‘ );
c = input ( ‘ Enter c; ‘ );
D = ( b^2 ) – ( 4 * a * c );
if D < 0
fprintf ( ‘ n The equation has no real roots . nn ‘)
elseif D == 0
root = -b / ( 2 * a );
fprintf ( ‘ nThe equation has one root, n ‘ )
fprintf ( ‘ %.7fnn ‘ , root )
else
r1 = ( – b + sqrt ( D ) ) / ( 2 * a ) ;
r2 = ( – b – sqrt ( D ) ) / ( 2 * a ) ;
fprintf ( ‘n The equation has two roots, n ‘ )
fprintf ( ‘ %.7f and %.7fnn ‘ , r1 ,r2 )
end
end
For the equation ax^2 + bx + c
Enter a;
1
Enter b;
9
Enter c;
14
The equation has two roots,
-2.0000000 and -7.0000000
For the equation ax^2 + bx + c
Enter a;
1
Enter b;
-3
Enter c;
-18
The equation has two roots,
6.0000000 and -3.0000000Hi, I’m doing a worksheet based around matlab which involved solving quadratic formulas. I probably overcomplicated it and now made a calculator that keeps giving the inverse of my expected answer, could anyone help please?
for k = 1 : 7
disp ( ‘ For the equation ax^2 + bx + c ‘ )
a = input ( ‘ Enter a; ‘ );
b = input ( ‘ Enter b; ‘ );
c = input ( ‘ Enter c; ‘ );
D = ( b^2 ) – ( 4 * a * c );
if D < 0
fprintf ( ‘ n The equation has no real roots . nn ‘)
elseif D == 0
root = -b / ( 2 * a );
fprintf ( ‘ nThe equation has one root, n ‘ )
fprintf ( ‘ %.7fnn ‘ , root )
else
r1 = ( – b + sqrt ( D ) ) / ( 2 * a ) ;
r2 = ( – b – sqrt ( D ) ) / ( 2 * a ) ;
fprintf ( ‘n The equation has two roots, n ‘ )
fprintf ( ‘ %.7f and %.7fnn ‘ , r1 ,r2 )
end
end
For the equation ax^2 + bx + c
Enter a;
1
Enter b;
9
Enter c;
14
The equation has two roots,
-2.0000000 and -7.0000000
For the equation ax^2 + bx + c
Enter a;
1
Enter b;
-3
Enter c;
-18
The equation has two roots,
6.0000000 and -3.0000000 Hi, I’m doing a worksheet based around matlab which involved solving quadratic formulas. I probably overcomplicated it and now made a calculator that keeps giving the inverse of my expected answer, could anyone help please?
for k = 1 : 7
disp ( ‘ For the equation ax^2 + bx + c ‘ )
a = input ( ‘ Enter a; ‘ );
b = input ( ‘ Enter b; ‘ );
c = input ( ‘ Enter c; ‘ );
D = ( b^2 ) – ( 4 * a * c );
if D < 0
fprintf ( ‘ n The equation has no real roots . nn ‘)
elseif D == 0
root = -b / ( 2 * a );
fprintf ( ‘ nThe equation has one root, n ‘ )
fprintf ( ‘ %.7fnn ‘ , root )
else
r1 = ( – b + sqrt ( D ) ) / ( 2 * a ) ;
r2 = ( – b – sqrt ( D ) ) / ( 2 * a ) ;
fprintf ( ‘n The equation has two roots, n ‘ )
fprintf ( ‘ %.7f and %.7fnn ‘ , r1 ,r2 )
end
end
For the equation ax^2 + bx + c
Enter a;
1
Enter b;
9
Enter c;
14
The equation has two roots,
-2.0000000 and -7.0000000
For the equation ax^2 + bx + c
Enter a;
1
Enter b;
-3
Enter c;
-18
The equation has two roots,
6.0000000 and -3.0000000 quadratic formula MATLAB Answers — New Questions
Write a function called freezing that takes a vector of numbers that correspond to daily low temperatures in Fahrenheit. Return numfreeze, the number of days with sub freezing
Please help!
3 is correct for Test 1, but I am going crazy trying to figure out why 5 is incorrect for Test 2.
function numfreeze = freezing(a)
numfreeze = sum(a>=32);
endPlease help!
3 is correct for Test 1, but I am going crazy trying to figure out why 5 is incorrect for Test 2.
function numfreeze = freezing(a)
numfreeze = sum(a>=32);
end Please help!
3 is correct for Test 1, but I am going crazy trying to figure out why 5 is incorrect for Test 2.
function numfreeze = freezing(a)
numfreeze = sum(a>=32);
end logical array MATLAB Answers — New Questions
Copilot cannot access OneDrive for Business files
I asked Copilot to look for files related to a client project. The files are saved to my OneDrive for Business account, which is part of my Office 365 E3 subscription.
Copilot returned the following error:
To give me access to your OneDrive folders, you would typically share the folder with my email address or provide a shareable link that I can access. However, as Microsoft 365 Copilot, I don’t have the capability to access personal OneDrive folders or files directly. My functionality is limited to providing assistance based on the information available to me through the search results and the capabilities I have within this chat.
If you need help with organizing or finding information within your OneDrive, I can guide you on how to use the search and organization features of OneDrive. Let me know how I can assist you further!
Additional Information:
In my 365 Admin Panel, Copilot has been given all permissions.Copilot now seems to be able to search my emails, so that’s an improvement.
This is extremely frustrating.
How do I set up my account so that Copilot can access everything across my 365 ecosystem?
I asked Copilot to look for files related to a client project. The files are saved to my OneDrive for Business account, which is part of my Office 365 E3 subscription. Copilot returned the following error:To give me access to your OneDrive folders, you would typically share the folder with my email address or provide a shareable link that I can access. However, as Microsoft 365 Copilot, I don’t have the capability to access personal OneDrive folders or files directly. My functionality is limited to providing assistance based on the information available to me through the search results and the capabilities I have within this chat.If you need help with organizing or finding information within your OneDrive, I can guide you on how to use the search and organization features of OneDrive. Let me know how I can assist you further! Additional Information:In my 365 Admin Panel, Copilot has been given all permissions.Copilot now seems to be able to search my emails, so that’s an improvement.This is extremely frustrating. How do I set up my account so that Copilot can access everything across my 365 ecosystem? Read More
Error when running function with batch()
Hi. I am using batch() to run a function with a par-for loop inside. When I run it as a script (instead of a function), everything works fine. However, when I replace the script with the equivalent function, I get an error. Here are the details:
%(A) Using batch() to call script. This works fine!
job = batch(parcluster(‘local’), ‘batchscript’,’Pool’,5);
%(B) Using batch() to call function. This produces an error.
jm=6;
job = batch(parcluster(‘local’),’batchfun’,0,{jm},’Pool’,5);
The script (batchscript.m) I am running in A, looks something like that:
jm = 6;
run(‘Paths.m’) %This creates ‘pth’ using ‘jm’
parfor vh = 1:length(alld)
parfun01(vh,jm,pth)
end
The function (batchfun.m) I am running in B, looks something like that:
function batchfun(jm)
run(‘Paths.m’) %This creates ‘pth’ using ‘jm’
parfor vh = 1:length(alld)
parfun01(vh,jm,pth)
end
They reason why I decided to turn this from a scrip to a function was because I wanted to pass jm as an input, instead of always changing the script. However, I cannot understand why it works perfectly fine as a script, but not as a function.
The error I am getting when running B) is the following:
getReport(job.Tasks(1).Error)
ans =
‘Error using batchfun (line 66)
The source code (E:Analysisbatchfun.m) for the parfor-loop that is trying to
execute on the worker could not be found.
Caused by:
Unrecognized function or variable ‘pth’.
Error using remoteParallelFunction (line 84)
Worker unable to find file.
Unrecognized function or variable ‘pth’.’
Anyone could please help me with what’s wrong? Thanks!Hi. I am using batch() to run a function with a par-for loop inside. When I run it as a script (instead of a function), everything works fine. However, when I replace the script with the equivalent function, I get an error. Here are the details:
%(A) Using batch() to call script. This works fine!
job = batch(parcluster(‘local’), ‘batchscript’,’Pool’,5);
%(B) Using batch() to call function. This produces an error.
jm=6;
job = batch(parcluster(‘local’),’batchfun’,0,{jm},’Pool’,5);
The script (batchscript.m) I am running in A, looks something like that:
jm = 6;
run(‘Paths.m’) %This creates ‘pth’ using ‘jm’
parfor vh = 1:length(alld)
parfun01(vh,jm,pth)
end
The function (batchfun.m) I am running in B, looks something like that:
function batchfun(jm)
run(‘Paths.m’) %This creates ‘pth’ using ‘jm’
parfor vh = 1:length(alld)
parfun01(vh,jm,pth)
end
They reason why I decided to turn this from a scrip to a function was because I wanted to pass jm as an input, instead of always changing the script. However, I cannot understand why it works perfectly fine as a script, but not as a function.
The error I am getting when running B) is the following:
getReport(job.Tasks(1).Error)
ans =
‘Error using batchfun (line 66)
The source code (E:Analysisbatchfun.m) for the parfor-loop that is trying to
execute on the worker could not be found.
Caused by:
Unrecognized function or variable ‘pth’.
Error using remoteParallelFunction (line 84)
Worker unable to find file.
Unrecognized function or variable ‘pth’.’
Anyone could please help me with what’s wrong? Thanks! Hi. I am using batch() to run a function with a par-for loop inside. When I run it as a script (instead of a function), everything works fine. However, when I replace the script with the equivalent function, I get an error. Here are the details:
%(A) Using batch() to call script. This works fine!
job = batch(parcluster(‘local’), ‘batchscript’,’Pool’,5);
%(B) Using batch() to call function. This produces an error.
jm=6;
job = batch(parcluster(‘local’),’batchfun’,0,{jm},’Pool’,5);
The script (batchscript.m) I am running in A, looks something like that:
jm = 6;
run(‘Paths.m’) %This creates ‘pth’ using ‘jm’
parfor vh = 1:length(alld)
parfun01(vh,jm,pth)
end
The function (batchfun.m) I am running in B, looks something like that:
function batchfun(jm)
run(‘Paths.m’) %This creates ‘pth’ using ‘jm’
parfor vh = 1:length(alld)
parfun01(vh,jm,pth)
end
They reason why I decided to turn this from a scrip to a function was because I wanted to pass jm as an input, instead of always changing the script. However, I cannot understand why it works perfectly fine as a script, but not as a function.
The error I am getting when running B) is the following:
getReport(job.Tasks(1).Error)
ans =
‘Error using batchfun (line 66)
The source code (E:Analysisbatchfun.m) for the parfor-loop that is trying to
execute on the worker could not be found.
Caused by:
Unrecognized function or variable ‘pth’.
Error using remoteParallelFunction (line 84)
Worker unable to find file.
Unrecognized function or variable ‘pth’.’
Anyone could please help me with what’s wrong? Thanks! batch, parfor, parallel computing, parallel MATLAB Answers — New Questions
using hooks with git source control from Matlab. Hooks that work from outside Matlab are not executed from within.
Hello Everyone,
I’m working with Matlab 2016a try to get the source control going. Commit, Push, Fetch etc work fine, from both the context menu in the Current Folder Window and from the GUI shipped with git.
But when I implement a server-sided hook in the remote repository, Matlab fails me by ignoring the hook. When I commit from outside Matlab, the hook works.
hook-file is located in ..remote_repohooks by the name ‘pre-receive’ without extension. Source Code:
#!/usr/bin/env python
import matplotlib.pyplot as plt
import sys
plt.figure()
plt.show()
sys.exit(1)
The hook is written for testing purposes only. It opens a matplotlib window and when the window is closed, an error is thrown as the Push-Operation is aborted.
As I mentioned, when I push my commit from outside Matlab via the GUI, the expected happens, matplotlib-window and error. But when I push from the same local repository to the same remote repository, the push is successful…
Is there a way to execute hooks both server-sided and local ones from Matlab?
Thanks in advance and greetings,
TobiasHello Everyone,
I’m working with Matlab 2016a try to get the source control going. Commit, Push, Fetch etc work fine, from both the context menu in the Current Folder Window and from the GUI shipped with git.
But when I implement a server-sided hook in the remote repository, Matlab fails me by ignoring the hook. When I commit from outside Matlab, the hook works.
hook-file is located in ..remote_repohooks by the name ‘pre-receive’ without extension. Source Code:
#!/usr/bin/env python
import matplotlib.pyplot as plt
import sys
plt.figure()
plt.show()
sys.exit(1)
The hook is written for testing purposes only. It opens a matplotlib window and when the window is closed, an error is thrown as the Push-Operation is aborted.
As I mentioned, when I push my commit from outside Matlab via the GUI, the expected happens, matplotlib-window and error. But when I push from the same local repository to the same remote repository, the push is successful…
Is there a way to execute hooks both server-sided and local ones from Matlab?
Thanks in advance and greetings,
Tobias Hello Everyone,
I’m working with Matlab 2016a try to get the source control going. Commit, Push, Fetch etc work fine, from both the context menu in the Current Folder Window and from the GUI shipped with git.
But when I implement a server-sided hook in the remote repository, Matlab fails me by ignoring the hook. When I commit from outside Matlab, the hook works.
hook-file is located in ..remote_repohooks by the name ‘pre-receive’ without extension. Source Code:
#!/usr/bin/env python
import matplotlib.pyplot as plt
import sys
plt.figure()
plt.show()
sys.exit(1)
The hook is written for testing purposes only. It opens a matplotlib window and when the window is closed, an error is thrown as the Push-Operation is aborted.
As I mentioned, when I push my commit from outside Matlab via the GUI, the expected happens, matplotlib-window and error. But when I push from the same local repository to the same remote repository, the push is successful…
Is there a way to execute hooks both server-sided and local ones from Matlab?
Thanks in advance and greetings,
Tobias source control, git, hooks MATLAB Answers — New Questions