Month: October 2024
Issue with Aardvark Interface in Instrument Control Toolbox
I am experiencing an issue with the Aardvark interface in the Instrument Control Toolbox. Despite having installed the Instrument Control Toolbox Support Package for Total Phase Aardvark I2C/SPI Interface, I receive the following message when attempting to use the `aardvarklist` function:
“`
Get the Aardvark driver by installing the Instrument Control Toolbox Support Package for Total Phase Aardvark I2C/SPI Interface from the Add-On Explorer.
“`
Here are the steps I have already taken to resolve the issue:
1. Reinstalled the Instrument Control Toolbox Support Package for Total Phase Aardvark I2C/SPI Interface from the Add-On Explorer.
2. Verified that the path `C:ProgramDataMATLABSupportPackagesR2024atoolboxinstrumentsupportpackagesaardvark` is included in the MATLAB path.
3. Restarted MATLAB multiple times.
4. Ensured that the Total Phase USB drivers are correctly installed and that the Aardvark adapter appears in the Windows Device Manager under the USB section.
5. Cleared the MATLAB toolbox cache using the `rehash toolboxcache` command.
6. Ran MATLAB as an administrator.
Despite these efforts, the issue persists. Could you please provide further assistance or guidance on how to resolve this problem?
Thank you for your support.I am experiencing an issue with the Aardvark interface in the Instrument Control Toolbox. Despite having installed the Instrument Control Toolbox Support Package for Total Phase Aardvark I2C/SPI Interface, I receive the following message when attempting to use the `aardvarklist` function:
“`
Get the Aardvark driver by installing the Instrument Control Toolbox Support Package for Total Phase Aardvark I2C/SPI Interface from the Add-On Explorer.
“`
Here are the steps I have already taken to resolve the issue:
1. Reinstalled the Instrument Control Toolbox Support Package for Total Phase Aardvark I2C/SPI Interface from the Add-On Explorer.
2. Verified that the path `C:ProgramDataMATLABSupportPackagesR2024atoolboxinstrumentsupportpackagesaardvark` is included in the MATLAB path.
3. Restarted MATLAB multiple times.
4. Ensured that the Total Phase USB drivers are correctly installed and that the Aardvark adapter appears in the Windows Device Manager under the USB section.
5. Cleared the MATLAB toolbox cache using the `rehash toolboxcache` command.
6. Ran MATLAB as an administrator.
Despite these efforts, the issue persists. Could you please provide further assistance or guidance on how to resolve this problem?
Thank you for your support. I am experiencing an issue with the Aardvark interface in the Instrument Control Toolbox. Despite having installed the Instrument Control Toolbox Support Package for Total Phase Aardvark I2C/SPI Interface, I receive the following message when attempting to use the `aardvarklist` function:
“`
Get the Aardvark driver by installing the Instrument Control Toolbox Support Package for Total Phase Aardvark I2C/SPI Interface from the Add-On Explorer.
“`
Here are the steps I have already taken to resolve the issue:
1. Reinstalled the Instrument Control Toolbox Support Package for Total Phase Aardvark I2C/SPI Interface from the Add-On Explorer.
2. Verified that the path `C:ProgramDataMATLABSupportPackagesR2024atoolboxinstrumentsupportpackagesaardvark` is included in the MATLAB path.
3. Restarted MATLAB multiple times.
4. Ensured that the Total Phase USB drivers are correctly installed and that the Aardvark adapter appears in the Windows Device Manager under the USB section.
5. Cleared the MATLAB toolbox cache using the `rehash toolboxcache` command.
6. Ran MATLAB as an administrator.
Despite these efforts, the issue persists. Could you please provide further assistance or guidance on how to resolve this problem?
Thank you for your support. aardvark, toolbox MATLAB Answers — New Questions
How to reduce building time in Virtual-vehicle composer
hello. I’m using Matlab 23b, and I’m using virtual vehicle composer, and I feel like changing just one constant for performance verification (for example, VCU internal thresholds) requires a full rebuild and takes a lot of time. If I run the simulation again with no changes, it starts almost immediately. Is there any way to reduce this rebuild time?hello. I’m using Matlab 23b, and I’m using virtual vehicle composer, and I feel like changing just one constant for performance verification (for example, VCU internal thresholds) requires a full rebuild and takes a lot of time. If I run the simulation again with no changes, it starts almost immediately. Is there any way to reduce this rebuild time? hello. I’m using Matlab 23b, and I’m using virtual vehicle composer, and I feel like changing just one constant for performance verification (for example, VCU internal thresholds) requires a full rebuild and takes a lot of time. If I run the simulation again with no changes, it starts almost immediately. Is there any way to reduce this rebuild time? vehicle composer, simulink MATLAB Answers — New Questions
Question regarding opticalFlowRAFT function
I am trying to use the opticalFlowRAFT function which is newly added to the 2024b version of MATLAB. However, there is very limited information regarding this function on the website. Can someone help me understand the input and output arguments of this function?
Thank youI am trying to use the opticalFlowRAFT function which is newly added to the 2024b version of MATLAB. However, there is very limited information regarding this function on the website. Can someone help me understand the input and output arguments of this function?
Thank you I am trying to use the opticalFlowRAFT function which is newly added to the 2024b version of MATLAB. However, there is very limited information regarding this function on the website. Can someone help me understand the input and output arguments of this function?
Thank you transferred MATLAB Answers — New Questions
Solve: use the Laplace transform to solve the given initial-value problem. Use a graphing utility to graph the solution. y′′ + y = 2 cos t δ(t − π) + 6 cos t δ(t − 2π), y(0) =
Solve: use the Laplace transform to solve the given
initial-value problem. Use a graphing utility to graph the
solution.
y′′ + y = 2 cos t δ(t − π) + 6 cos t δ(t − 2π), y(0) = 1, y′(0)
= 0Solve: use the Laplace transform to solve the given
initial-value problem. Use a graphing utility to graph the
solution.
y′′ + y = 2 cos t δ(t − π) + 6 cos t δ(t − 2π), y(0) = 1, y′(0)
= 0 Solve: use the Laplace transform to solve the given
initial-value problem. Use a graphing utility to graph the
solution.
y′′ + y = 2 cos t δ(t − π) + 6 cos t δ(t − 2π), y(0) = 1, y′(0)
= 0 solve: use the laplace transform to solve the give MATLAB Answers — New Questions
Problem with OFDM transmit-receive code
Hello, I have a problem with my code. It’s a basic ofdm transmitter and receiver implementation making use of BPSK. But when I increase the bps to 4 (i.e 16 QAM) and above, I don’t get the desired BER curve. I need help with this Please.
% Parameters
bps = 1; % Bits per symbol (1 for BPSK)
M = 2^bps; % Modulation order
totalBandwidth = 20e6; % Total bandwidth (Hz)
subcarrierSpacing = 15e3; % Subcarrier spacing (Hz)
nFFT = ceil(totalBandwidth / subcarrierSpacing); % Number of FFT bins
EbNoVec = 1:1:10; % Eb/No values (dB)
% Noise power values
noisePower_dBW = -120; % AWGN noise power in dBW
noisePower_W = 10^(noisePower_dBW / 10); % Convert noise power to watts
impulseNoisePower_dBW = -113; % Impulse noise power in dBW
impulseNoisePower_W = 10^(impulseNoisePower_dBW / 10); % Convert impulse noise power to watts
% Initialize BER vectors
berEstAWGN = zeros(size(EbNoVec)); % BER for AWGN only
berEstImp = zeros(size(EbNoVec)); % BER for AWGN + impulse noise
snr_dB = convertSNR(EbNoVec, "ebno", "snr", BitsPerSymbol=bps); % Convert Eb/No to SNR
% Loop over SNR values
for n = 1:length(EbNoVec)
%snr_dB = EbNoVec(n) + 10*log10(bps); % Convert Eb/No to SNR
% Initialize error and bit counters
numErrsAWGN = 0;
numErrsImp = 0;
numBits = 0;
while numErrsAWGN < 200 && numBits < 1e6
% Generate random symbols and bits
txSymbols = randi([0 M-1], nFFT, 1);
txBits = int2bit(txSymbols, bps);
% OFDM Modulation
txGrid = qammod(txSymbols, M, ‘UnitAveragePower’, true);
txOut = ifft(txGrid, nFFT);
% Calculate signal power
signalPower_dBW = snr_dB(n) + noisePower_dBW;
signalPower_W = 10^(signalPower_dBW / 10);
scalingFactor = sqrt(signalPower_W / mean(abs(txOut).^2));
txOutScaled = txOut * scalingFactor;
% AWGN
noiseSignal_notscaled = randn(size(txOutScaled)) + 1j * randn(size(txOutScaled));
noiseAWGN = sqrt(noisePower_W / 2) * noiseSignal_notscaled;
% Impulse noise (bursty)
impulseNoise = zeros(size(txOutScaled)); % Initialize as zeros
burstPositions = rand(size(txOutScaled)) < 1; % 5% of the time noise bursts occur
impulseNoise(burstPositions) = sqrt(impulseNoisePower_W / 2) * …
(randn(sum(burstPositions), 1) + 1j * randn(sum(burstPositions), 1));
% Received signal with AWGN only
rxInAWGN = txOutScaled + noiseAWGN;
% Received signal with AWGN + Impulse noise
rxInImp = txOutScaled + noiseAWGN + impulseNoise;
% OFDM Demodulation
rxGridAWGN = fft(rxInAWGN, nFFT);
rxGridImp = fft(rxInImp, nFFT);
% Demodulate symbols
rxSymbolsAWGN = qamdemod(rxGridAWGN, M, ‘UnitAveragePower’, true);
rxSymbolsImp = qamdemod(rxGridImp, M, ‘UnitAveragePower’, true);
% Convert symbols to bits
rxBitsAWGN = int2bit(rxSymbolsAWGN, bps);
rxBitsImp = int2bit(rxSymbolsImp, bps);
% Count bit errors
[bitErrorsAWGN, ~] = biterr(txBits, rxBitsAWGN);
[bitErrorsImp, ~] = biterr(txBits, rxBitsImp);
% Update error counters and transmitted bits
numErrsAWGN = numErrsAWGN + bitErrorsAWGN;
numErrsImp = numErrsImp + bitErrorsImp;
numBits = numBits + nFFT * bps;
end
% Calculate BER
berEstAWGN(n) = numErrsAWGN / numBits;
berEstImp(n) = numErrsImp / numBits;
end
% Plot BER results
figure;
semilogy(EbNoVec, berEstAWGN, ‘b-o’, ‘LineWidth’, 2); % AWGN only
hold on;
semilogy(EbNoVec, berEstImp, ‘r–o’, ‘LineWidth’, 2); % AWGN + Impulse noise
grid on;
title(‘OFDM BER for BPSK with AWGN and Impulse Noise’);
xlabel(‘Eb/No (dB)’);
ylabel(‘Bit Error Rate (BER)’);
legend(‘AWGN Only’, ‘AWGN + Impulse Noise’);
hold off;Hello, I have a problem with my code. It’s a basic ofdm transmitter and receiver implementation making use of BPSK. But when I increase the bps to 4 (i.e 16 QAM) and above, I don’t get the desired BER curve. I need help with this Please.
% Parameters
bps = 1; % Bits per symbol (1 for BPSK)
M = 2^bps; % Modulation order
totalBandwidth = 20e6; % Total bandwidth (Hz)
subcarrierSpacing = 15e3; % Subcarrier spacing (Hz)
nFFT = ceil(totalBandwidth / subcarrierSpacing); % Number of FFT bins
EbNoVec = 1:1:10; % Eb/No values (dB)
% Noise power values
noisePower_dBW = -120; % AWGN noise power in dBW
noisePower_W = 10^(noisePower_dBW / 10); % Convert noise power to watts
impulseNoisePower_dBW = -113; % Impulse noise power in dBW
impulseNoisePower_W = 10^(impulseNoisePower_dBW / 10); % Convert impulse noise power to watts
% Initialize BER vectors
berEstAWGN = zeros(size(EbNoVec)); % BER for AWGN only
berEstImp = zeros(size(EbNoVec)); % BER for AWGN + impulse noise
snr_dB = convertSNR(EbNoVec, "ebno", "snr", BitsPerSymbol=bps); % Convert Eb/No to SNR
% Loop over SNR values
for n = 1:length(EbNoVec)
%snr_dB = EbNoVec(n) + 10*log10(bps); % Convert Eb/No to SNR
% Initialize error and bit counters
numErrsAWGN = 0;
numErrsImp = 0;
numBits = 0;
while numErrsAWGN < 200 && numBits < 1e6
% Generate random symbols and bits
txSymbols = randi([0 M-1], nFFT, 1);
txBits = int2bit(txSymbols, bps);
% OFDM Modulation
txGrid = qammod(txSymbols, M, ‘UnitAveragePower’, true);
txOut = ifft(txGrid, nFFT);
% Calculate signal power
signalPower_dBW = snr_dB(n) + noisePower_dBW;
signalPower_W = 10^(signalPower_dBW / 10);
scalingFactor = sqrt(signalPower_W / mean(abs(txOut).^2));
txOutScaled = txOut * scalingFactor;
% AWGN
noiseSignal_notscaled = randn(size(txOutScaled)) + 1j * randn(size(txOutScaled));
noiseAWGN = sqrt(noisePower_W / 2) * noiseSignal_notscaled;
% Impulse noise (bursty)
impulseNoise = zeros(size(txOutScaled)); % Initialize as zeros
burstPositions = rand(size(txOutScaled)) < 1; % 5% of the time noise bursts occur
impulseNoise(burstPositions) = sqrt(impulseNoisePower_W / 2) * …
(randn(sum(burstPositions), 1) + 1j * randn(sum(burstPositions), 1));
% Received signal with AWGN only
rxInAWGN = txOutScaled + noiseAWGN;
% Received signal with AWGN + Impulse noise
rxInImp = txOutScaled + noiseAWGN + impulseNoise;
% OFDM Demodulation
rxGridAWGN = fft(rxInAWGN, nFFT);
rxGridImp = fft(rxInImp, nFFT);
% Demodulate symbols
rxSymbolsAWGN = qamdemod(rxGridAWGN, M, ‘UnitAveragePower’, true);
rxSymbolsImp = qamdemod(rxGridImp, M, ‘UnitAveragePower’, true);
% Convert symbols to bits
rxBitsAWGN = int2bit(rxSymbolsAWGN, bps);
rxBitsImp = int2bit(rxSymbolsImp, bps);
% Count bit errors
[bitErrorsAWGN, ~] = biterr(txBits, rxBitsAWGN);
[bitErrorsImp, ~] = biterr(txBits, rxBitsImp);
% Update error counters and transmitted bits
numErrsAWGN = numErrsAWGN + bitErrorsAWGN;
numErrsImp = numErrsImp + bitErrorsImp;
numBits = numBits + nFFT * bps;
end
% Calculate BER
berEstAWGN(n) = numErrsAWGN / numBits;
berEstImp(n) = numErrsImp / numBits;
end
% Plot BER results
figure;
semilogy(EbNoVec, berEstAWGN, ‘b-o’, ‘LineWidth’, 2); % AWGN only
hold on;
semilogy(EbNoVec, berEstImp, ‘r–o’, ‘LineWidth’, 2); % AWGN + Impulse noise
grid on;
title(‘OFDM BER for BPSK with AWGN and Impulse Noise’);
xlabel(‘Eb/No (dB)’);
ylabel(‘Bit Error Rate (BER)’);
legend(‘AWGN Only’, ‘AWGN + Impulse Noise’);
hold off; Hello, I have a problem with my code. It’s a basic ofdm transmitter and receiver implementation making use of BPSK. But when I increase the bps to 4 (i.e 16 QAM) and above, I don’t get the desired BER curve. I need help with this Please.
% Parameters
bps = 1; % Bits per symbol (1 for BPSK)
M = 2^bps; % Modulation order
totalBandwidth = 20e6; % Total bandwidth (Hz)
subcarrierSpacing = 15e3; % Subcarrier spacing (Hz)
nFFT = ceil(totalBandwidth / subcarrierSpacing); % Number of FFT bins
EbNoVec = 1:1:10; % Eb/No values (dB)
% Noise power values
noisePower_dBW = -120; % AWGN noise power in dBW
noisePower_W = 10^(noisePower_dBW / 10); % Convert noise power to watts
impulseNoisePower_dBW = -113; % Impulse noise power in dBW
impulseNoisePower_W = 10^(impulseNoisePower_dBW / 10); % Convert impulse noise power to watts
% Initialize BER vectors
berEstAWGN = zeros(size(EbNoVec)); % BER for AWGN only
berEstImp = zeros(size(EbNoVec)); % BER for AWGN + impulse noise
snr_dB = convertSNR(EbNoVec, "ebno", "snr", BitsPerSymbol=bps); % Convert Eb/No to SNR
% Loop over SNR values
for n = 1:length(EbNoVec)
%snr_dB = EbNoVec(n) + 10*log10(bps); % Convert Eb/No to SNR
% Initialize error and bit counters
numErrsAWGN = 0;
numErrsImp = 0;
numBits = 0;
while numErrsAWGN < 200 && numBits < 1e6
% Generate random symbols and bits
txSymbols = randi([0 M-1], nFFT, 1);
txBits = int2bit(txSymbols, bps);
% OFDM Modulation
txGrid = qammod(txSymbols, M, ‘UnitAveragePower’, true);
txOut = ifft(txGrid, nFFT);
% Calculate signal power
signalPower_dBW = snr_dB(n) + noisePower_dBW;
signalPower_W = 10^(signalPower_dBW / 10);
scalingFactor = sqrt(signalPower_W / mean(abs(txOut).^2));
txOutScaled = txOut * scalingFactor;
% AWGN
noiseSignal_notscaled = randn(size(txOutScaled)) + 1j * randn(size(txOutScaled));
noiseAWGN = sqrt(noisePower_W / 2) * noiseSignal_notscaled;
% Impulse noise (bursty)
impulseNoise = zeros(size(txOutScaled)); % Initialize as zeros
burstPositions = rand(size(txOutScaled)) < 1; % 5% of the time noise bursts occur
impulseNoise(burstPositions) = sqrt(impulseNoisePower_W / 2) * …
(randn(sum(burstPositions), 1) + 1j * randn(sum(burstPositions), 1));
% Received signal with AWGN only
rxInAWGN = txOutScaled + noiseAWGN;
% Received signal with AWGN + Impulse noise
rxInImp = txOutScaled + noiseAWGN + impulseNoise;
% OFDM Demodulation
rxGridAWGN = fft(rxInAWGN, nFFT);
rxGridImp = fft(rxInImp, nFFT);
% Demodulate symbols
rxSymbolsAWGN = qamdemod(rxGridAWGN, M, ‘UnitAveragePower’, true);
rxSymbolsImp = qamdemod(rxGridImp, M, ‘UnitAveragePower’, true);
% Convert symbols to bits
rxBitsAWGN = int2bit(rxSymbolsAWGN, bps);
rxBitsImp = int2bit(rxSymbolsImp, bps);
% Count bit errors
[bitErrorsAWGN, ~] = biterr(txBits, rxBitsAWGN);
[bitErrorsImp, ~] = biterr(txBits, rxBitsImp);
% Update error counters and transmitted bits
numErrsAWGN = numErrsAWGN + bitErrorsAWGN;
numErrsImp = numErrsImp + bitErrorsImp;
numBits = numBits + nFFT * bps;
end
% Calculate BER
berEstAWGN(n) = numErrsAWGN / numBits;
berEstImp(n) = numErrsImp / numBits;
end
% Plot BER results
figure;
semilogy(EbNoVec, berEstAWGN, ‘b-o’, ‘LineWidth’, 2); % AWGN only
hold on;
semilogy(EbNoVec, berEstImp, ‘r–o’, ‘LineWidth’, 2); % AWGN + Impulse noise
grid on;
title(‘OFDM BER for BPSK with AWGN and Impulse Noise’);
xlabel(‘Eb/No (dB)’);
ylabel(‘Bit Error Rate (BER)’);
legend(‘AWGN Only’, ‘AWGN + Impulse Noise’);
hold off; ofdm MATLAB Answers — New Questions
How to visualize a vector in Simscape Multibody
Hello!
I have been working on a 6-DOF Simscape Multibody simulation for a thrust vectored rocket. The simulation works, but I have been wanting to visualize the thrust vector below the rocket. How should I go about this?
In my searching, I have found that this visualization would likely have to be a geometric solid with no mass, which is okay (I just want an indication of direction and I have modeled a vector solid already). This would be relatively straightforward if the Rigid Transform block could take a dynamic rotation matrix, as that is already what my simulation uses to calculate the thrust vector in the proper global frame, but it seems that it can only take a compile- or run-time rotation matrix.
I have also considered using a spherical joint under the rocket connected to the vector solid, but doing so would require being able to set the position of the spherical joint, and I have not been able to figure out how to do that.
I have even tried making my own Simscape component to act as a Dynamic Transform block, but the Simscape language does not have access to the Multibody Frame class necessary to make this work.
Is visualizing a vector like this possible, and if so, what is the best way to go about it?Hello!
I have been working on a 6-DOF Simscape Multibody simulation for a thrust vectored rocket. The simulation works, but I have been wanting to visualize the thrust vector below the rocket. How should I go about this?
In my searching, I have found that this visualization would likely have to be a geometric solid with no mass, which is okay (I just want an indication of direction and I have modeled a vector solid already). This would be relatively straightforward if the Rigid Transform block could take a dynamic rotation matrix, as that is already what my simulation uses to calculate the thrust vector in the proper global frame, but it seems that it can only take a compile- or run-time rotation matrix.
I have also considered using a spherical joint under the rocket connected to the vector solid, but doing so would require being able to set the position of the spherical joint, and I have not been able to figure out how to do that.
I have even tried making my own Simscape component to act as a Dynamic Transform block, but the Simscape language does not have access to the Multibody Frame class necessary to make this work.
Is visualizing a vector like this possible, and if so, what is the best way to go about it? Hello!
I have been working on a 6-DOF Simscape Multibody simulation for a thrust vectored rocket. The simulation works, but I have been wanting to visualize the thrust vector below the rocket. How should I go about this?
In my searching, I have found that this visualization would likely have to be a geometric solid with no mass, which is okay (I just want an indication of direction and I have modeled a vector solid already). This would be relatively straightforward if the Rigid Transform block could take a dynamic rotation matrix, as that is already what my simulation uses to calculate the thrust vector in the proper global frame, but it seems that it can only take a compile- or run-time rotation matrix.
I have also considered using a spherical joint under the rocket connected to the vector solid, but doing so would require being able to set the position of the spherical joint, and I have not been able to figure out how to do that.
I have even tried making my own Simscape component to act as a Dynamic Transform block, but the Simscape language does not have access to the Multibody Frame class necessary to make this work.
Is visualizing a vector like this possible, and if so, what is the best way to go about it? simscape, simulink MATLAB Answers — New Questions
I am getting errors that I am using “.*” and “*” wrongly in my matrix multiplications in my code. I am poor at matrix algebra and don’t know when to use each operator.
I am getting errors that I am using ".*" and "*" wrongly in my matrix multiplications in my code. I am poor at matrix algebra and don’t know when to use each operator.
clear;
clc;
H=[5, -5;
2.5, -2.5;
0, -2.5;
0, -4;
-4, -2.5]
diagW=diag([1, 1, 1, 1, 1]*10^4);
Z=[0.85;
0.8;
0.6;
0.4;
-0.81]
transH=H’;
%Ht=transpose of H;
HtWH=transH*diagW.*H;
HtWZ=transH*diagW.*Z;
X=(inv(HtWH)).*HtWZ;
Zhat=Z.*X;
%Estimation of errors.
ESTofErrors=Z-Zhat;
%Value of the cost function
variance=[0.015, 0.01, 0.005, 0.015, 0.01]
CF=0;
for i=1:5
CF = CF + ((Zhat(i))^2/(variance(i))^2)
end
alpha=0.01;
K=3;
Xka=chi2cdf(0.1, 3);
Xka=11.345;
G=HtWH;
invG=inv(G);
HinvGHt=H.*invG.*Ht;
R=ESTofErrors;
S=R-(H*invG.*transH);
diagS=diag(S);
%Expected value of the cost function.
EVCF=sum(diagS,2);
%Calculating the standardized error
SE=(variance)/sqrt(5);
Errors: Arrays have incompatible sizes for this operation.I am getting errors that I am using ".*" and "*" wrongly in my matrix multiplications in my code. I am poor at matrix algebra and don’t know when to use each operator.
clear;
clc;
H=[5, -5;
2.5, -2.5;
0, -2.5;
0, -4;
-4, -2.5]
diagW=diag([1, 1, 1, 1, 1]*10^4);
Z=[0.85;
0.8;
0.6;
0.4;
-0.81]
transH=H’;
%Ht=transpose of H;
HtWH=transH*diagW.*H;
HtWZ=transH*diagW.*Z;
X=(inv(HtWH)).*HtWZ;
Zhat=Z.*X;
%Estimation of errors.
ESTofErrors=Z-Zhat;
%Value of the cost function
variance=[0.015, 0.01, 0.005, 0.015, 0.01]
CF=0;
for i=1:5
CF = CF + ((Zhat(i))^2/(variance(i))^2)
end
alpha=0.01;
K=3;
Xka=chi2cdf(0.1, 3);
Xka=11.345;
G=HtWH;
invG=inv(G);
HinvGHt=H.*invG.*Ht;
R=ESTofErrors;
S=R-(H*invG.*transH);
diagS=diag(S);
%Expected value of the cost function.
EVCF=sum(diagS,2);
%Calculating the standardized error
SE=(variance)/sqrt(5);
Errors: Arrays have incompatible sizes for this operation. I am getting errors that I am using ".*" and "*" wrongly in my matrix multiplications in my code. I am poor at matrix algebra and don’t know when to use each operator.
clear;
clc;
H=[5, -5;
2.5, -2.5;
0, -2.5;
0, -4;
-4, -2.5]
diagW=diag([1, 1, 1, 1, 1]*10^4);
Z=[0.85;
0.8;
0.6;
0.4;
-0.81]
transH=H’;
%Ht=transpose of H;
HtWH=transH*diagW.*H;
HtWZ=transH*diagW.*Z;
X=(inv(HtWH)).*HtWZ;
Zhat=Z.*X;
%Estimation of errors.
ESTofErrors=Z-Zhat;
%Value of the cost function
variance=[0.015, 0.01, 0.005, 0.015, 0.01]
CF=0;
for i=1:5
CF = CF + ((Zhat(i))^2/(variance(i))^2)
end
alpha=0.01;
K=3;
Xka=chi2cdf(0.1, 3);
Xka=11.345;
G=HtWH;
invG=inv(G);
HinvGHt=H.*invG.*Ht;
R=ESTofErrors;
S=R-(H*invG.*transH);
diagS=diag(S);
%Expected value of the cost function.
EVCF=sum(diagS,2);
%Calculating the standardized error
SE=(variance)/sqrt(5);
Errors: Arrays have incompatible sizes for this operation. matrix multiplication, matrix algebra MATLAB Answers — New Questions
Reselling MSSQL
Hi,
We sell our software as an on-prem solution for resorts in North America. This solution requires MSSQL and we would like to be able to resell that as part of the bundle. We’ve signed the CSP Microsoft Partner Agreement and we understand that we need a CSP Indirect Provider who can work with us. We would expect to sell between 10-100 SQL licenses per year. Can somebody help?
Hi, We sell our software as an on-prem solution for resorts in North America. This solution requires MSSQL and we would like to be able to resell that as part of the bundle. We’ve signed the CSP Microsoft Partner Agreement and we understand that we need a CSP Indirect Provider who can work with us. We would expect to sell between 10-100 SQL licenses per year. Can somebody help? Read More
September V2 Title Plan now available!
September V1 Title Plan has been uploaded. Go to: aka.ms/Courseware_Title_Plan
Don’t forget to checkout updates made to the Title Plan, shared in its permanent location, linked above.
Please note: This is not a support forum. Only comments related to this specific blog post content are permitted and responded to.
For ILT Courseware Support, please visit: aka.ms/ILTSupport
If you have ILT questions not related to this blog post, please reach out to your program for support.
Microsoft Tech Community – Latest Blogs –Read More
Why do I get a connection error when installing or activating MATLAB or other MathWorks products?
I get an error that I cannot connect to MathWorks when running the MathWorks installer or the activation client; however, I can access the website. Why can’t the MathWorks Installer or activation client connect to the MathWorks?
Connection Error
The application could not connect to MathWorks.
For more information on resolving this issue, see this Support Article.I get an error that I cannot connect to MathWorks when running the MathWorks installer or the activation client; however, I can access the website. Why can’t the MathWorks Installer or activation client connect to the MathWorks?
Connection Error
The application could not connect to MathWorks.
For more information on resolving this issue, see this Support Article. I get an error that I cannot connect to MathWorks when running the MathWorks installer or the activation client; however, I can access the website. Why can’t the MathWorks Installer or activation client connect to the MathWorks?
Connection Error
The application could not connect to MathWorks.
For more information on resolving this issue, see this Support Article. MATLAB Answers — New Questions
How do I plot an integral which is repeated over an interval?
I am attempting to plot the absporptance (alpha_s_bar) of an uncontaminated spacecraft as a function of the incident light wavelenght. The absorptance is found by integrating two different functions of wavelength over an interval from zero to the wavelength value of interest, on an interval from 0 to 0.7 microns. The code I have attached below runs and returns different values of absorptance as the wavelenght of interest (L) changes, but does not save the values before iterating, so I end up with one scalar value as alpha_s_bar. I am interested in saving the values of alpha_s_bar as a vector so I can plot them against the wavelength.
%Note that I will be using x for the wavelength for ease of typing
% Start by defining the constants for the absorptance for typical
% outgassing products, called alpha_c in problem statement, where
% alpha_c=M10*exp(M11*L)
M10=34.898;
M11=-8.6481;
% Next define the constants for solar absorptivity, alpha_s, where
% aplha_s=M0+M1*L+M2*L^2+M3*L^3
M0=0.28779;
M1=0.06028;
M2=-0.046055;
M3=0.020211;
% Next, define the constants for the solar spectrum (adjusted so units are microns), S, where
% S=2*C1/L^5[exp(C2/L*T)-1]
T=5500;
C1=5.594E-7;
C2=1438.8;
for L=0:0.01:0.7;
fnum=@(x) (M0+M1.*x+M2.*(x.^2)+M3.*(x.^3))./((x.^5).*exp(C2./(x.*T)));
fden=@(x) 1./((x.^5).*exp(C2./(x.*T)));
alpha_bar_s=integral(fnum,0,L)./integral(fden,0,L)
plot(L,alpha_bar_s)
hold on
endI am attempting to plot the absporptance (alpha_s_bar) of an uncontaminated spacecraft as a function of the incident light wavelenght. The absorptance is found by integrating two different functions of wavelength over an interval from zero to the wavelength value of interest, on an interval from 0 to 0.7 microns. The code I have attached below runs and returns different values of absorptance as the wavelenght of interest (L) changes, but does not save the values before iterating, so I end up with one scalar value as alpha_s_bar. I am interested in saving the values of alpha_s_bar as a vector so I can plot them against the wavelength.
%Note that I will be using x for the wavelength for ease of typing
% Start by defining the constants for the absorptance for typical
% outgassing products, called alpha_c in problem statement, where
% alpha_c=M10*exp(M11*L)
M10=34.898;
M11=-8.6481;
% Next define the constants for solar absorptivity, alpha_s, where
% aplha_s=M0+M1*L+M2*L^2+M3*L^3
M0=0.28779;
M1=0.06028;
M2=-0.046055;
M3=0.020211;
% Next, define the constants for the solar spectrum (adjusted so units are microns), S, where
% S=2*C1/L^5[exp(C2/L*T)-1]
T=5500;
C1=5.594E-7;
C2=1438.8;
for L=0:0.01:0.7;
fnum=@(x) (M0+M1.*x+M2.*(x.^2)+M3.*(x.^3))./((x.^5).*exp(C2./(x.*T)));
fden=@(x) 1./((x.^5).*exp(C2./(x.*T)));
alpha_bar_s=integral(fnum,0,L)./integral(fden,0,L)
plot(L,alpha_bar_s)
hold on
end I am attempting to plot the absporptance (alpha_s_bar) of an uncontaminated spacecraft as a function of the incident light wavelenght. The absorptance is found by integrating two different functions of wavelength over an interval from zero to the wavelength value of interest, on an interval from 0 to 0.7 microns. The code I have attached below runs and returns different values of absorptance as the wavelenght of interest (L) changes, but does not save the values before iterating, so I end up with one scalar value as alpha_s_bar. I am interested in saving the values of alpha_s_bar as a vector so I can plot them against the wavelength.
%Note that I will be using x for the wavelength for ease of typing
% Start by defining the constants for the absorptance for typical
% outgassing products, called alpha_c in problem statement, where
% alpha_c=M10*exp(M11*L)
M10=34.898;
M11=-8.6481;
% Next define the constants for solar absorptivity, alpha_s, where
% aplha_s=M0+M1*L+M2*L^2+M3*L^3
M0=0.28779;
M1=0.06028;
M2=-0.046055;
M3=0.020211;
% Next, define the constants for the solar spectrum (adjusted so units are microns), S, where
% S=2*C1/L^5[exp(C2/L*T)-1]
T=5500;
C1=5.594E-7;
C2=1438.8;
for L=0:0.01:0.7;
fnum=@(x) (M0+M1.*x+M2.*(x.^2)+M3.*(x.^3))./((x.^5).*exp(C2./(x.*T)));
fden=@(x) 1./((x.^5).*exp(C2./(x.*T)));
alpha_bar_s=integral(fnum,0,L)./integral(fden,0,L)
plot(L,alpha_bar_s)
hold on
end matlab, integral, plotting, for loop MATLAB Answers — New Questions
Does MATLAB support High DPI screens on Linux?
I am running MATLAB on Linux on a high resolution 4K display. The menus, menu bar, etc are very small and the characters are difficult to read because of their small size. I have already changed the font size in the editor and command window, but I cannot find any way of changing the MATLAB program menu bar size. I am running MATLAB on Linux on a high resolution 4K display. The menus, menu bar, etc are very small and the characters are difficult to read because of their small size. I have already changed the font size in the editor and command window, but I cannot find any way of changing the MATLAB program menu bar size. I am running MATLAB on Linux on a high resolution 4K display. The menus, menu bar, etc are very small and the characters are difficult to read because of their small size. I have already changed the font size in the editor and command window, but I cannot find any way of changing the MATLAB program menu bar size. high, dpi, ubuntu, linux, 4k MATLAB Answers — New Questions
Reference data source for Simulink Data center cooling example’s default values
I am looking for the source for the default numbers that are used in Data center cooling example of Simulink.
Is there any source for it?I am looking for the source for the default numbers that are used in Data center cooling example of Simulink.
Is there any source for it? I am looking for the source for the default numbers that are used in Data center cooling example of Simulink.
Is there any source for it? simulnk, simscape MATLAB Answers — New Questions
New Blog | Keep your online activity safer on public Wi-Fi with Microsoft Defender for individuals
By Ashwin PR
Public Wi-Fi is usually free, easy and convenient, but not necessarily always safe. As they say, there is no ‘free lunch’ .
Microsoft Defender for individuals1 aims to provide a safer online experience wherever you go and late last year, we introduced privacy protection (VPN)2 , so you can browse without having to worry about your personal data being intercepted over an unsecure Wi-Fi connection.
Read the full post here: Keep your online activity safer on public Wi-Fi with Microsoft Defender for individuals
By Ashwin PR
Figure 1 – Privacy protection UI on the Defender mobile app
Public Wi-Fi is usually free, easy and convenient, but not necessarily always safe. As they say, there is no ‘free lunch’ .
Microsoft Defender for individuals1 aims to provide a safer online experience wherever you go and late last year, we introduced privacy protection (VPN)2 , so you can browse without having to worry about your personal data being intercepted over an unsecure Wi-Fi connection.
Read the full post here: Keep your online activity safer on public Wi-Fi with Microsoft Defender for individuals
Validating consent on MS Forms
I’m creating new forms which will capture children attending activities and needs to be approved by a parent. The old way was to have the parent sign and authorise participation. Can anyone in the community think of a way to do this with MS Forms which would meet legal requirements that a proper person has authorised the form instead of the child completing the form on behalf of the parent?
I’m creating new forms which will capture children attending activities and needs to be approved by a parent. The old way was to have the parent sign and authorise participation. Can anyone in the community think of a way to do this with MS Forms which would meet legal requirements that a proper person has authorised the form instead of the child completing the form on behalf of the parent? Read More
New Blog | Security settings management on multi-tenant environments in Microsoft Defender XDR
By Maayan Mazig
Several months ago, we released device security settings management within Microsoft Defender XDR. This experience enables security administrators to configure Microsoft Defender for Endpoint security settings for devices on all platforms (including Windows, Linux, and Mac) without having to leave the Defender portal. The streamlined portal experience breaks down the wall between Security and IT teams by presenting a shared view for both, making it easier for security administrators to strengthen the security posture of their devices.
Security administrators can now drive even greater efficiencies with simplified security settings management supporting multi-tenancy environments that are common to large enterprises and managed services security providers (MSSPs). The multi-tenant view in the Defender XDR portal (Multi-tenant management in Microsoft Defender XDR – Microsoft Defender XDR | Microsoft Learn) provides security administrators a consolidated view of all security policies across their entire organization, including all tenants’ policies, without needing to switch portals. To access this page, navigate to Endpoints > Configuration Management > Endpoint Security Policies.
Read the full post here: Security settings management is available for multi-tenant environments in Microsoft Defender XDR
By Maayan Mazig
Several months ago, we released device security settings management within Microsoft Defender XDR. This experience enables security administrators to configure Microsoft Defender for Endpoint security settings for devices on all platforms (including Windows, Linux, and Mac) without having to leave the Defender portal. The streamlined portal experience breaks down the wall between Security and IT teams by presenting a shared view for both, making it easier for security administrators to strengthen the security posture of their devices.
Security administrators can now drive even greater efficiencies with simplified security settings management supporting multi-tenancy environments that are common to large enterprises and managed services security providers (MSSPs). The multi-tenant view in the Defender XDR portal (Multi-tenant management in Microsoft Defender XDR – Microsoft Defender XDR | Microsoft Learn) provides security administrators a consolidated view of all security policies across their entire organization, including all tenants’ policies, without needing to switch portals. To access this page, navigate to Endpoints > Configuration Management > Endpoint Security Policies.
Read the full post here: Security settings management is available for multi-tenant environments in Microsoft Defender XDR Read More
Excel
On my spreadsheet, when I save it to my documents folder, it gives me the prompt that it cannot be saved because AUTO SAVE is off. My auto save intermittently goes off automatically and it will not come back on. I have Cox help and they think it might have something to do with the One Drive. That’s the extent of my knowledge! We recently have gone from Windows 10—-to 11
On my spreadsheet, when I save it to my documents folder, it gives me the prompt that it cannot be saved because AUTO SAVE is off. My auto save intermittently goes off automatically and it will not come back on. I have Cox help and they think it might have something to do with the One Drive. That’s the extent of my knowledge! We recently have gone from Windows 10—-to 11 Read More
load-sensitive system in simscape
I am building a model of a load-sensitive system in simscape. I used a pressure compensator to control the pressure drop before and after the valve, but this compensator does not seem to be able to adjust the opening area based on the feedback. The area can only be calculated based on the pressure drop. Refer to Figure 1. This problem bothers me.
Figure 1I am building a model of a load-sensitive system in simscape. I used a pressure compensator to control the pressure drop before and after the valve, but this compensator does not seem to be able to adjust the opening area based on the feedback. The area can only be calculated based on the pressure drop. Refer to Figure 1. This problem bothers me.
Figure 1 I am building a model of a load-sensitive system in simscape. I used a pressure compensator to control the pressure drop before and after the valve, but this compensator does not seem to be able to adjust the opening area based on the feedback. The area can only be calculated based on the pressure drop. Refer to Figure 1. This problem bothers me.
Figure 1 simscape, hydraulic system MATLAB Answers — New Questions
Error regarding jxbrower DLL when opening Live Editor Script
A customer is getting the below error and also MATLAB freezes everytime they try to open Live Editor files:
Exception in thread "IPC Process Thread" java.lang.UnsatisfiedLinkError: C:UsersxxxxAppDataLocalTemp1jxbrowser-chromium-43.0.2357.52.5.4.3dataTempjxbrowser-common64-7f5a758a-e611-4dcb-b8ce-ecd0c96bb9a2.dll: This program is blocked by group policy. For more information, contact your system administrator at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at com.teamdev.jxbrowser.chromium.internal.LibraryLoader.loadLibrary(Unknown Source) at com.teamdev.jxbrowser.chromium.internal.SharedMemoryLibrary.<init>(Unknown Source) at com.teamdev.jxbrowser.chromium.internal.SharedMemoryLibrary.getInstance(Unknown Source) at com.teamdev.jxbrowser.chromium.internal.ipc.ChromiumProcess.start(Unknown Source) at com.teamdev.jxbrowser.chromium.internal.ipc.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:748)
Customer could run the file but not open it or edit it or see the code. They were also able to run M file. the issue was only with Live Script.A customer is getting the below error and also MATLAB freezes everytime they try to open Live Editor files:
Exception in thread "IPC Process Thread" java.lang.UnsatisfiedLinkError: C:UsersxxxxAppDataLocalTemp1jxbrowser-chromium-43.0.2357.52.5.4.3dataTempjxbrowser-common64-7f5a758a-e611-4dcb-b8ce-ecd0c96bb9a2.dll: This program is blocked by group policy. For more information, contact your system administrator at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at com.teamdev.jxbrowser.chromium.internal.LibraryLoader.loadLibrary(Unknown Source) at com.teamdev.jxbrowser.chromium.internal.SharedMemoryLibrary.<init>(Unknown Source) at com.teamdev.jxbrowser.chromium.internal.SharedMemoryLibrary.getInstance(Unknown Source) at com.teamdev.jxbrowser.chromium.internal.ipc.ChromiumProcess.start(Unknown Source) at com.teamdev.jxbrowser.chromium.internal.ipc.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:748)
Customer could run the file but not open it or edit it or see the code. They were also able to run M file. the issue was only with Live Script. A customer is getting the below error and also MATLAB freezes everytime they try to open Live Editor files:
Exception in thread "IPC Process Thread" java.lang.UnsatisfiedLinkError: C:UsersxxxxAppDataLocalTemp1jxbrowser-chromium-43.0.2357.52.5.4.3dataTempjxbrowser-common64-7f5a758a-e611-4dcb-b8ce-ecd0c96bb9a2.dll: This program is blocked by group policy. For more information, contact your system administrator at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at com.teamdev.jxbrowser.chromium.internal.LibraryLoader.loadLibrary(Unknown Source) at com.teamdev.jxbrowser.chromium.internal.SharedMemoryLibrary.<init>(Unknown Source) at com.teamdev.jxbrowser.chromium.internal.SharedMemoryLibrary.getInstance(Unknown Source) at com.teamdev.jxbrowser.chromium.internal.ipc.ChromiumProcess.start(Unknown Source) at com.teamdev.jxbrowser.chromium.internal.ipc.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:748)
Customer could run the file but not open it or edit it or see the code. They were also able to run M file. the issue was only with Live Script. live, editor, group, policy, blocked, ipc, process, thread MATLAB Answers — New Questions
SPFx App Not Showing API Requests to Azure Function in SharePoint Admin Center
Hi everyone,
I’m facing an issue where my SPFx web part needs to connect to an Azure Function to retrieve data, but the API access request for the Azure Function is not showing up in the SharePoint Admin Center under the API Access tab for approval.
Setup Overview:
Azure Function App with Managed Identity:
Enabled System-Assigned Managed Identity for the Azure Function to handle authentication without secrets in the SPFx web part.
Identity Provider Configuration:
Added Microsoft as the Identity Provider for the Azure Function and registered the function in Azure AD.
CORS Configuration:
Configured CORS in the Function App to allow requests from my SharePoint tenant.
SPFx Web Part Configuration:
Using AadHttpClient in the SPFx web part to make API calls to the Azure Function.In the config/package-solution.json, I included the webApiPermissionRequests for the Azure Function:
“webApiPermissionRequests”: [
{
“resource”: “AzureFunctionAppName”,
“scope”: “user_impersonation”
}
]
Permissions Approval:
After uploading the .sppkg file to the App Catalog, I expect to see the API access request in SharePoint Admin Center > API Access for approval, but no request is appearing.
Important Observation:
I have the same setup for another Azure Function (in a different subscription but the same tenant), and it’s working perfectly. The API access request for that function shows up in the SharePoint Admin Center, and I was able to approve it without issues.
What I’ve Tried:
Verified the Azure Function works independently by testing with Postman (using a Bearer token) and confirmed it responds correctly.Checked the SPFx web part successfully calls the Azure Function using AadHttpClient.Double-checked the App Catalog upload and deployment.Confirmed I am logged in as a SharePoint global admin with permission to approve API requests.
The Problem:
Despite the same setup working fine for a different Azure Function, I’m not seeing the API access request for this Azure Function in the SharePoint Admin Center.
Hi everyone,I’m facing an issue where my SPFx web part needs to connect to an Azure Function to retrieve data, but the API access request for the Azure Function is not showing up in the SharePoint Admin Center under the API Access tab for approval.Setup Overview:Azure Function App with Managed Identity:Enabled System-Assigned Managed Identity for the Azure Function to handle authentication without secrets in the SPFx web part.Identity Provider Configuration:Added Microsoft as the Identity Provider for the Azure Function and registered the function in Azure AD. CORS Configuration:Configured CORS in the Function App to allow requests from my SharePoint tenant.SPFx Web Part Configuration:Using AadHttpClient in the SPFx web part to make API calls to the Azure Function.In the config/package-solution.json, I included the webApiPermissionRequests for the Azure Function: “webApiPermissionRequests”: [
{
“resource”: “AzureFunctionAppName”,
“scope”: “user_impersonation”
}
] Permissions Approval:After uploading the .sppkg file to the App Catalog, I expect to see the API access request in SharePoint Admin Center > API Access for approval, but no request is appearing.Important Observation:I have the same setup for another Azure Function (in a different subscription but the same tenant), and it’s working perfectly. The API access request for that function shows up in the SharePoint Admin Center, and I was able to approve it without issues.What I’ve Tried:Verified the Azure Function works independently by testing with Postman (using a Bearer token) and confirmed it responds correctly.Checked the SPFx web part successfully calls the Azure Function using AadHttpClient.Double-checked the App Catalog upload and deployment.Confirmed I am logged in as a SharePoint global admin with permission to approve API requests.The Problem:Despite the same setup working fine for a different Azure Function, I’m not seeing the API access request for this Azure Function in the SharePoint Admin Center. Read More