Tag Archives: matlab
How add timestamp to entities upon creation and determine arrival times upon arrival.
All,
I want to measure delays of entities flowing through my model in simulink. The idea is to add a timestamp as an attribute to an entity when created and at the end of this entity’s journey i need to record its arrival time. Using both, I can determine its travel time or delay.
Is there a clever way to measure these two timings, e.g. use a timestamp?
Your help is much appreciated,
FrankAll,
I want to measure delays of entities flowing through my model in simulink. The idea is to add a timestamp as an attribute to an entity when created and at the end of this entity’s journey i need to record its arrival time. Using both, I can determine its travel time or delay.
Is there a clever way to measure these two timings, e.g. use a timestamp?
Your help is much appreciated,
Frank All,
I want to measure delays of entities flowing through my model in simulink. The idea is to add a timestamp as an attribute to an entity when created and at the end of this entity’s journey i need to record its arrival time. Using both, I can determine its travel time or delay.
Is there a clever way to measure these two timings, e.g. use a timestamp?
Your help is much appreciated,
Frank simulink, entity, delay measurements MATLAB Answers — New Questions
How to increment variable with Push button Dashboard ?
I want to increment the block "variable" of 1 when I push on the button.
ThanksI want to increment the block "variable" of 1 when I push on the button.
Thanks I want to increment the block "variable" of 1 when I push on the button.
Thanks #dashboard, #push button, #increment MATLAB Answers — New Questions
How to make the marker width more thicker
I have plot the data but what i want is to make the marker more thicker, so that it can be more clearly visible . I have attached the code .i would be grateful if you could help me .Thank you in advance .I have plot the data but what i want is to make the marker more thicker, so that it can be more clearly visible . I have attached the code .i would be grateful if you could help me .Thank you in advance . I have plot the data but what i want is to make the marker more thicker, so that it can be more clearly visible . I have attached the code .i would be grateful if you could help me .Thank you in advance . d MATLAB Answers — New Questions
Why wouldn’t ‘StrongDataTypingWithSimulink’ for ‘Stateflow.Chart’ classes be recognized as a property?
I receive an error when I execute the following code:
load_system(‘sflib’);
set_param(‘sflib’,’Lock’,’off’);
rt = sfroot;
m = rt.find(‘-isa’,’Stateflow.Machine’,’Name’,’sflib’);
chart = m.findDeep(‘Chart’);
chart(1).StrongDataTypingWithSimulink = 1;
The error message is:
Unrecognized property ‘StrongDataTypingWithSimulink’ for class ‘Stateflow.Chart’.
Why wouldn’t this be recognized?I receive an error when I execute the following code:
load_system(‘sflib’);
set_param(‘sflib’,’Lock’,’off’);
rt = sfroot;
m = rt.find(‘-isa’,’Stateflow.Machine’,’Name’,’sflib’);
chart = m.findDeep(‘Chart’);
chart(1).StrongDataTypingWithSimulink = 1;
The error message is:
Unrecognized property ‘StrongDataTypingWithSimulink’ for class ‘Stateflow.Chart’.
Why wouldn’t this be recognized? I receive an error when I execute the following code:
load_system(‘sflib’);
set_param(‘sflib’,’Lock’,’off’);
rt = sfroot;
m = rt.find(‘-isa’,’Stateflow.Machine’,’Name’,’sflib’);
chart = m.findDeep(‘Chart’);
chart(1).StrongDataTypingWithSimulink = 1;
The error message is:
Unrecognized property ‘StrongDataTypingWithSimulink’ for class ‘Stateflow.Chart’.
Why wouldn’t this be recognized? stateflow, simulink MATLAB Answers — New Questions
Mapreduce with tall array in matrix multiplication
Hi,
I am processing huge dataset (billions rows), so I used tall array in my code. While I found the tall array are not support general matrix multiplication. The ‘*’ only works in a limited conditions.
I am wondering if we can combine mapreduce to perform matrix multiplication with tall arrays ? Below is a example shows the error.
A = tall(ones(200,2));
B = tall(ones(2,3));
values = A*B;
gather(values)
Error using tall/mtimes>iVerifyAtLeastOneScalar
Matrix multiplication of two tall arrays requires one of them to be scalar.
Learn more about errors encountered during GATHER.
Error in * (line 31)
[X,Y] = iVerifyAtLeastOneScalar(X,Y,"MATLAB:bigdata:array:MtimesBothTall");Hi,
I am processing huge dataset (billions rows), so I used tall array in my code. While I found the tall array are not support general matrix multiplication. The ‘*’ only works in a limited conditions.
I am wondering if we can combine mapreduce to perform matrix multiplication with tall arrays ? Below is a example shows the error.
A = tall(ones(200,2));
B = tall(ones(2,3));
values = A*B;
gather(values)
Error using tall/mtimes>iVerifyAtLeastOneScalar
Matrix multiplication of two tall arrays requires one of them to be scalar.
Learn more about errors encountered during GATHER.
Error in * (line 31)
[X,Y] = iVerifyAtLeastOneScalar(X,Y,"MATLAB:bigdata:array:MtimesBothTall"); Hi,
I am processing huge dataset (billions rows), so I used tall array in my code. While I found the tall array are not support general matrix multiplication. The ‘*’ only works in a limited conditions.
I am wondering if we can combine mapreduce to perform matrix multiplication with tall arrays ? Below is a example shows the error.
A = tall(ones(200,2));
B = tall(ones(2,3));
values = A*B;
gather(values)
Error using tall/mtimes>iVerifyAtLeastOneScalar
Matrix multiplication of two tall arrays requires one of them to be scalar.
Learn more about errors encountered during GATHER.
Error in * (line 31)
[X,Y] = iVerifyAtLeastOneScalar(X,Y,"MATLAB:bigdata:array:MtimesBothTall"); tall array, datastore, mapreduce MATLAB Answers — New Questions
How to configure MATLAB to use the current version of MinGW when building a vehicle using the Virtual Vehicle Composer in MATLAB R2024a
I have three MATLAB releases installed: MATLAB R2017a, MATLAB R2020b, and MATLAB R2024a. When trying to build a vehicle with all default parameters using Virtual Vehicle Composer in MATLAB R2024a, I receive the following error message:
Build/run a model from virtual vehicle composer, ran into the following error:
### Searching for referenced models in model ‘ConfiguredVirtualVehicleModel’.
### Found 10 model references to update.
### Starting serial model reference simulation build.
‘"C:PROGRA~3MATLABSUPPOR~1R2017a3P778C~1.INSMINGW_~1.INSbinmingw32-make.exe"’ is not recognized as an internal or external command,
operable program or batch file.
The make command returned an error of 9009
### Build procedure for BMSBalancingLogic aborted due to an error.
It seems like the program tries to call "make" from the the MATLAB R2017a installation. I also check the mex setup in MATLAB R2024a by running the following command, and the returned result shows it is configured to use MinGW64 Compiler (C).
>> mex -setup
MEX configured to use ‘MinGW64 Compiler (C)’ for C language compilation.
To choose a different C compiler, select one from the following:
MinGW64 Compiler (C) mex -setup:C:Users<username>AppDataRoamingMathWorksMATLABR2024amex_C_win64.xml C
Microsoft Visual C++ 2022 (C) mex -setup:’C:Program FilesMATLABR2024abinwin64mexoptsmsvc2022.xml’ C
How can I resolve this issue?I have three MATLAB releases installed: MATLAB R2017a, MATLAB R2020b, and MATLAB R2024a. When trying to build a vehicle with all default parameters using Virtual Vehicle Composer in MATLAB R2024a, I receive the following error message:
Build/run a model from virtual vehicle composer, ran into the following error:
### Searching for referenced models in model ‘ConfiguredVirtualVehicleModel’.
### Found 10 model references to update.
### Starting serial model reference simulation build.
‘"C:PROGRA~3MATLABSUPPOR~1R2017a3P778C~1.INSMINGW_~1.INSbinmingw32-make.exe"’ is not recognized as an internal or external command,
operable program or batch file.
The make command returned an error of 9009
### Build procedure for BMSBalancingLogic aborted due to an error.
It seems like the program tries to call "make" from the the MATLAB R2017a installation. I also check the mex setup in MATLAB R2024a by running the following command, and the returned result shows it is configured to use MinGW64 Compiler (C).
>> mex -setup
MEX configured to use ‘MinGW64 Compiler (C)’ for C language compilation.
To choose a different C compiler, select one from the following:
MinGW64 Compiler (C) mex -setup:C:Users<username>AppDataRoamingMathWorksMATLABR2024amex_C_win64.xml C
Microsoft Visual C++ 2022 (C) mex -setup:’C:Program FilesMATLABR2024abinwin64mexoptsmsvc2022.xml’ C
How can I resolve this issue? I have three MATLAB releases installed: MATLAB R2017a, MATLAB R2020b, and MATLAB R2024a. When trying to build a vehicle with all default parameters using Virtual Vehicle Composer in MATLAB R2024a, I receive the following error message:
Build/run a model from virtual vehicle composer, ran into the following error:
### Searching for referenced models in model ‘ConfiguredVirtualVehicleModel’.
### Found 10 model references to update.
### Starting serial model reference simulation build.
‘"C:PROGRA~3MATLABSUPPOR~1R2017a3P778C~1.INSMINGW_~1.INSbinmingw32-make.exe"’ is not recognized as an internal or external command,
operable program or batch file.
The make command returned an error of 9009
### Build procedure for BMSBalancingLogic aborted due to an error.
It seems like the program tries to call "make" from the the MATLAB R2017a installation. I also check the mex setup in MATLAB R2024a by running the following command, and the returned result shows it is configured to use MinGW64 Compiler (C).
>> mex -setup
MEX configured to use ‘MinGW64 Compiler (C)’ for C language compilation.
To choose a different C compiler, select one from the following:
MinGW64 Compiler (C) mex -setup:C:Users<username>AppDataRoamingMathWorksMATLABR2024amex_C_win64.xml C
Microsoft Visual C++ 2022 (C) mex -setup:’C:Program FilesMATLABR2024abinwin64mexoptsmsvc2022.xml’ C
How can I resolve this issue? virtualvehiclecomposer MATLAB Answers — New Questions
How to simulate a inter satellite link in Iridium Constellation?
Hi.
I generate the Iridium Constellation as suggested here https://it.mathworks.com/help/satcom/ug/coverage-maps-for-satellite-constellation.html. Thanks to the access and acceIntervals functions, I can determine which satellites are in view of my gorund station, located in New York, in the given time interval.
I would also like to simulate the intersatellite links between the satellites that are in view and which are simultaneously also in view from my gorund station. How is it possible to do this?
Once I have the intersatellite links, I can use the aer function not only to get the distance from the ground station to each satellite, but also between the intersatellite links.
ThanksHi.
I generate the Iridium Constellation as suggested here https://it.mathworks.com/help/satcom/ug/coverage-maps-for-satellite-constellation.html. Thanks to the access and acceIntervals functions, I can determine which satellites are in view of my gorund station, located in New York, in the given time interval.
I would also like to simulate the intersatellite links between the satellites that are in view and which are simultaneously also in view from my gorund station. How is it possible to do this?
Once I have the intersatellite links, I can use the aer function not only to get the distance from the ground station to each satellite, but also between the intersatellite links.
Thanks Hi.
I generate the Iridium Constellation as suggested here https://it.mathworks.com/help/satcom/ug/coverage-maps-for-satellite-constellation.html. Thanks to the access and acceIntervals functions, I can determine which satellites are in view of my gorund station, located in New York, in the given time interval.
I would also like to simulate the intersatellite links between the satellites that are in view and which are simultaneously also in view from my gorund station. How is it possible to do this?
Once I have the intersatellite links, I can use the aer function not only to get the distance from the ground station to each satellite, but also between the intersatellite links.
Thanks intersatellite link, satellite MATLAB Answers — New Questions
how to open excel in side script
i want open excel use certain command in the script, which command can i use?i want open excel use certain command in the script, which command can i use? i want open excel use certain command in the script, which command can i use? excel open, script MATLAB Answers — New Questions
Maximum variable size allowed by the program is exceeded. FOR OCDM MODULATION
i need a help plzzzz !
i would have the OCDM modulation BER SNR figure for 64 QAM
so had a problem at this point, matlab give me this problem : Maximum variable size allowed by the program is exceeded.
here is the code :
%% Simulation Parameters
% OCDM Modulation
num_OCDMGrdIntv = 16; %c’est = num_OCDMSymbol/16
num_OCDMSymbol = 256; % number of symbol
num_OCDMChirp = 256; %number of subcarriers
num_OCDMBlock = 2^6;
OCDMParam = struct;
OCDMParam.Num_GrdIntv = num_OCDMGrdIntv;
OCDMParam.Num_Symbol = num_OCDMSymbol;
OCDMParam.Num_Chirp = num_OCDMChirp;
OCDMParam.Num_Block = num_OCDMBlock;
% Symbol Mapping
num_ModemOrder = 64; % Oder da modulaQAM
%symbolConstMapping = qammod( ( 0 : 2^num_ModemOrder – 1 ).’, 2^num_ModemOrder, ‘InputType’, ‘integer’, ‘UnitAveragePower’, true );
if num_ModemOrder==4
symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder – 1 )/sqrt(1/2),num_OCDMSymbol);
end
if num_ModemOrder==16
symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder – 1 )/sqrt(1/10),num_OCDMSymbol);
end
if num_ModemOrder==64
symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder – 1 )/sqrt(1/46),num_OCDMSymbol);
end
% OCDM Channel Equalization
OCDMChEst_Param = struct;
OCDMChEst_Param.EQUMode = 1;
OCDMChEst_Param.SNR = 100;
OCDMChEst_Param.CFR = 1;
% Signal Frame
num_InfoBit = num_ModemOrder * num_OCDMSymbol * num_OCDMBlock;
num_ModSignal = ( num_OCDMChirp + num_OCDMGrdIntv ) * num_OCDMBlock;
% Multipath Fading Channel
mode_Multipath = ‘LTE-EVA’;
switch mode_Multipath
case ‘AWGN’
case ‘EquiPath’
Ch_MultiPath_PDP = [ 1, 1, 1, 1, 1, 1 ].’; % Power delay profile
Ch_MultiPath_DP = [ 0, 6, 8, 11, 17, 25 ].’; % Delay profile
case ‘LTE-EVA’
Ch_EVA_DelayProfile = [
0 0.0
30 -1.5
150 -1.4
310 -3.6
370 -0.6
710 -9.1
1090 -7.0
1730 -12.0
2510 -16.9
];
Ch_MultiPath_PDP = 10.^( Ch_EVA_DelayProfile( : , 2 ) ./ 10 );
Ch_MultiPath_DP = round( Ch_EVA_DelayProfile( : , 1 ) ./ 1e9 .* 100e6 );
otherwise
end
Ch_MultiPath_PDP = Ch_MultiPath_PDP ./ sum( Ch_MultiPath_PDP );
Ch_NumTap = size( Ch_MultiPath_DP, 1 );
% Channel Setting
%vec_EbN0_dB = ( 00 : 2 : 20 ).’; %= ( 00 : 5 : 50 ).’; %50
vec_EbN0_dB = 0 : 2 : 20 ;
vec_SNR_dB = vec_EbN0_dB + 10 * log10( num_ModemOrder );
vec_BER = zeros( size( vec_EbN0_dB ) );
vec_EVM = zeros( size( vec_EbN0_dB ) );
num_Loop = 2^8;
for cnt_SNR = 1 : numel( vec_SNR_dB )
num_SNR_dB = vec_SNR_dB( cnt_SNR );
num_EbN0_dB = vec_EbN0_dB( cnt_SNR );
num_BitError = 0;
num_EVM = 0;
num_SigVar = 0;
for cnt_Loop = 1 : num_Loop
%% OCDM Transmitter
t_InfoBit = double( rand( num_InfoBit, 1 ) > 0.5 );
t_ModSymbol = qammod( t_InfoBit, 2^num_ModemOrder, ‘InputType’, ‘bit’, ‘UnitAveragePower’, true );
t_ModSignal = xOCDMModem_TX( t_ModSymbol, OCDMParam );
%% Channel Transmission
ch_Signal = t_ModSignal;
% Multipath channel implementation
Ch_MultiPath_Tap = sqrt( 0.5 ) * randn( size( Ch_MultiPath_PDP ) ) + 1i * randn( size( Ch_MultiPath_PDP ) );
Ch_MultiPath_Tap = Ch_MultiPath_PDP .* Ch_MultiPath_Tap;
Ch_MultiPath_CIR = zeros( num_OCDMChirp, 1 );
Ch_MultiPath_CIR( 1 + Ch_MultiPath_DP, : ) = Ch_MultiPath_Tap;
Ch_MultiPath_CFR = fft( Ch_MultiPath_CIR );
ch_MultiPath_Signal = zeros( size( t_ModSignal ), ‘like’, ch_Signal );
for cnt_Path = 1 : Ch_NumTap
ch_MultiPath_Signal = ch_MultiPath_Signal + …
Ch_MultiPath_Tap( cnt_Path ) .* circshift( ch_Signal, [ Ch_MultiPath_DP( cnt_Path ), 0 ] );
end
% Received signal at RF front-end
r_ModSignal = ch_MultiPath_Signal;
r_ModSignal = awgn( r_ModSignal, num_SNR_dB );
%% OCDM Receiver
OCDMChEst_Param.SNR = 10.^( num_SNR_dB ./ 10 );
OCDMChEst_Param.CFR = Ch_MultiPath_CFR;
r_ModSymbol = xOCDMModem_RX( r_ModSignal, OCDMParam, OCDMChEst_Param );
r_InfoBit = qamdemod( r_ModSymbol, 2^num_ModemOrder, ‘OutputType’, ‘bit’, ‘UnitAveragePower’, true );
num_BitError = num_BitError + sum( r_InfoBit ~= t_InfoBit );
num_EVM = num_EVM + mean( abs( r_ModSymbol – t_ModSymbol ) );
num_SigVar = num_SigVar + mean( abs( r_ModSymbol – t_ModSymbol ).^2 );
end
%% Performance Evaluation
num_BER = num_BitError / num_InfoBit / num_Loop;
num_EVM = num_EVM / num_Loop;
num_SigVar = num_SigVar / num_Loop;
vec_BER( cnt_SNR ) = num_BER;
vec_EVM( cnt_SNR ) = num_EVM;
str_PerfPrompt = ‘EbN0 = %.2f dB, EVM = %.2f%%, BER = %.3e (%d errors out of %d bits)n’;
fprintf( str_PerfPrompt, num_EbN0_dB, num_EVM * 100, num_BER, num_BitError, num_InfoBit );
end
%% Results Rendering
vec_TheorBER = berawgn( vec_EbN0_dB, ‘qam’, 2^num_ModemOrder );
semilogy( vec_EbN0_dB, vec_TheorBER, ‘b’, ‘MarkerSize’, 2 );i need a help plzzzz !
i would have the OCDM modulation BER SNR figure for 64 QAM
so had a problem at this point, matlab give me this problem : Maximum variable size allowed by the program is exceeded.
here is the code :
%% Simulation Parameters
% OCDM Modulation
num_OCDMGrdIntv = 16; %c’est = num_OCDMSymbol/16
num_OCDMSymbol = 256; % number of symbol
num_OCDMChirp = 256; %number of subcarriers
num_OCDMBlock = 2^6;
OCDMParam = struct;
OCDMParam.Num_GrdIntv = num_OCDMGrdIntv;
OCDMParam.Num_Symbol = num_OCDMSymbol;
OCDMParam.Num_Chirp = num_OCDMChirp;
OCDMParam.Num_Block = num_OCDMBlock;
% Symbol Mapping
num_ModemOrder = 64; % Oder da modulaQAM
%symbolConstMapping = qammod( ( 0 : 2^num_ModemOrder – 1 ).’, 2^num_ModemOrder, ‘InputType’, ‘integer’, ‘UnitAveragePower’, true );
if num_ModemOrder==4
symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder – 1 )/sqrt(1/2),num_OCDMSymbol);
end
if num_ModemOrder==16
symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder – 1 )/sqrt(1/10),num_OCDMSymbol);
end
if num_ModemOrder==64
symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder – 1 )/sqrt(1/46),num_OCDMSymbol);
end
% OCDM Channel Equalization
OCDMChEst_Param = struct;
OCDMChEst_Param.EQUMode = 1;
OCDMChEst_Param.SNR = 100;
OCDMChEst_Param.CFR = 1;
% Signal Frame
num_InfoBit = num_ModemOrder * num_OCDMSymbol * num_OCDMBlock;
num_ModSignal = ( num_OCDMChirp + num_OCDMGrdIntv ) * num_OCDMBlock;
% Multipath Fading Channel
mode_Multipath = ‘LTE-EVA’;
switch mode_Multipath
case ‘AWGN’
case ‘EquiPath’
Ch_MultiPath_PDP = [ 1, 1, 1, 1, 1, 1 ].’; % Power delay profile
Ch_MultiPath_DP = [ 0, 6, 8, 11, 17, 25 ].’; % Delay profile
case ‘LTE-EVA’
Ch_EVA_DelayProfile = [
0 0.0
30 -1.5
150 -1.4
310 -3.6
370 -0.6
710 -9.1
1090 -7.0
1730 -12.0
2510 -16.9
];
Ch_MultiPath_PDP = 10.^( Ch_EVA_DelayProfile( : , 2 ) ./ 10 );
Ch_MultiPath_DP = round( Ch_EVA_DelayProfile( : , 1 ) ./ 1e9 .* 100e6 );
otherwise
end
Ch_MultiPath_PDP = Ch_MultiPath_PDP ./ sum( Ch_MultiPath_PDP );
Ch_NumTap = size( Ch_MultiPath_DP, 1 );
% Channel Setting
%vec_EbN0_dB = ( 00 : 2 : 20 ).’; %= ( 00 : 5 : 50 ).’; %50
vec_EbN0_dB = 0 : 2 : 20 ;
vec_SNR_dB = vec_EbN0_dB + 10 * log10( num_ModemOrder );
vec_BER = zeros( size( vec_EbN0_dB ) );
vec_EVM = zeros( size( vec_EbN0_dB ) );
num_Loop = 2^8;
for cnt_SNR = 1 : numel( vec_SNR_dB )
num_SNR_dB = vec_SNR_dB( cnt_SNR );
num_EbN0_dB = vec_EbN0_dB( cnt_SNR );
num_BitError = 0;
num_EVM = 0;
num_SigVar = 0;
for cnt_Loop = 1 : num_Loop
%% OCDM Transmitter
t_InfoBit = double( rand( num_InfoBit, 1 ) > 0.5 );
t_ModSymbol = qammod( t_InfoBit, 2^num_ModemOrder, ‘InputType’, ‘bit’, ‘UnitAveragePower’, true );
t_ModSignal = xOCDMModem_TX( t_ModSymbol, OCDMParam );
%% Channel Transmission
ch_Signal = t_ModSignal;
% Multipath channel implementation
Ch_MultiPath_Tap = sqrt( 0.5 ) * randn( size( Ch_MultiPath_PDP ) ) + 1i * randn( size( Ch_MultiPath_PDP ) );
Ch_MultiPath_Tap = Ch_MultiPath_PDP .* Ch_MultiPath_Tap;
Ch_MultiPath_CIR = zeros( num_OCDMChirp, 1 );
Ch_MultiPath_CIR( 1 + Ch_MultiPath_DP, : ) = Ch_MultiPath_Tap;
Ch_MultiPath_CFR = fft( Ch_MultiPath_CIR );
ch_MultiPath_Signal = zeros( size( t_ModSignal ), ‘like’, ch_Signal );
for cnt_Path = 1 : Ch_NumTap
ch_MultiPath_Signal = ch_MultiPath_Signal + …
Ch_MultiPath_Tap( cnt_Path ) .* circshift( ch_Signal, [ Ch_MultiPath_DP( cnt_Path ), 0 ] );
end
% Received signal at RF front-end
r_ModSignal = ch_MultiPath_Signal;
r_ModSignal = awgn( r_ModSignal, num_SNR_dB );
%% OCDM Receiver
OCDMChEst_Param.SNR = 10.^( num_SNR_dB ./ 10 );
OCDMChEst_Param.CFR = Ch_MultiPath_CFR;
r_ModSymbol = xOCDMModem_RX( r_ModSignal, OCDMParam, OCDMChEst_Param );
r_InfoBit = qamdemod( r_ModSymbol, 2^num_ModemOrder, ‘OutputType’, ‘bit’, ‘UnitAveragePower’, true );
num_BitError = num_BitError + sum( r_InfoBit ~= t_InfoBit );
num_EVM = num_EVM + mean( abs( r_ModSymbol – t_ModSymbol ) );
num_SigVar = num_SigVar + mean( abs( r_ModSymbol – t_ModSymbol ).^2 );
end
%% Performance Evaluation
num_BER = num_BitError / num_InfoBit / num_Loop;
num_EVM = num_EVM / num_Loop;
num_SigVar = num_SigVar / num_Loop;
vec_BER( cnt_SNR ) = num_BER;
vec_EVM( cnt_SNR ) = num_EVM;
str_PerfPrompt = ‘EbN0 = %.2f dB, EVM = %.2f%%, BER = %.3e (%d errors out of %d bits)n’;
fprintf( str_PerfPrompt, num_EbN0_dB, num_EVM * 100, num_BER, num_BitError, num_InfoBit );
end
%% Results Rendering
vec_TheorBER = berawgn( vec_EbN0_dB, ‘qam’, 2^num_ModemOrder );
semilogy( vec_EbN0_dB, vec_TheorBER, ‘b’, ‘MarkerSize’, 2 ); i need a help plzzzz !
i would have the OCDM modulation BER SNR figure for 64 QAM
so had a problem at this point, matlab give me this problem : Maximum variable size allowed by the program is exceeded.
here is the code :
%% Simulation Parameters
% OCDM Modulation
num_OCDMGrdIntv = 16; %c’est = num_OCDMSymbol/16
num_OCDMSymbol = 256; % number of symbol
num_OCDMChirp = 256; %number of subcarriers
num_OCDMBlock = 2^6;
OCDMParam = struct;
OCDMParam.Num_GrdIntv = num_OCDMGrdIntv;
OCDMParam.Num_Symbol = num_OCDMSymbol;
OCDMParam.Num_Chirp = num_OCDMChirp;
OCDMParam.Num_Block = num_OCDMBlock;
% Symbol Mapping
num_ModemOrder = 64; % Oder da modulaQAM
%symbolConstMapping = qammod( ( 0 : 2^num_ModemOrder – 1 ).’, 2^num_ModemOrder, ‘InputType’, ‘integer’, ‘UnitAveragePower’, true );
if num_ModemOrder==4
symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder – 1 )/sqrt(1/2),num_OCDMSymbol);
end
if num_ModemOrder==16
symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder – 1 )/sqrt(1/10),num_OCDMSymbol);
end
if num_ModemOrder==64
symbolConstMapping=qamdemod(( 0 : 2^num_ModemOrder – 1 )/sqrt(1/46),num_OCDMSymbol);
end
% OCDM Channel Equalization
OCDMChEst_Param = struct;
OCDMChEst_Param.EQUMode = 1;
OCDMChEst_Param.SNR = 100;
OCDMChEst_Param.CFR = 1;
% Signal Frame
num_InfoBit = num_ModemOrder * num_OCDMSymbol * num_OCDMBlock;
num_ModSignal = ( num_OCDMChirp + num_OCDMGrdIntv ) * num_OCDMBlock;
% Multipath Fading Channel
mode_Multipath = ‘LTE-EVA’;
switch mode_Multipath
case ‘AWGN’
case ‘EquiPath’
Ch_MultiPath_PDP = [ 1, 1, 1, 1, 1, 1 ].’; % Power delay profile
Ch_MultiPath_DP = [ 0, 6, 8, 11, 17, 25 ].’; % Delay profile
case ‘LTE-EVA’
Ch_EVA_DelayProfile = [
0 0.0
30 -1.5
150 -1.4
310 -3.6
370 -0.6
710 -9.1
1090 -7.0
1730 -12.0
2510 -16.9
];
Ch_MultiPath_PDP = 10.^( Ch_EVA_DelayProfile( : , 2 ) ./ 10 );
Ch_MultiPath_DP = round( Ch_EVA_DelayProfile( : , 1 ) ./ 1e9 .* 100e6 );
otherwise
end
Ch_MultiPath_PDP = Ch_MultiPath_PDP ./ sum( Ch_MultiPath_PDP );
Ch_NumTap = size( Ch_MultiPath_DP, 1 );
% Channel Setting
%vec_EbN0_dB = ( 00 : 2 : 20 ).’; %= ( 00 : 5 : 50 ).’; %50
vec_EbN0_dB = 0 : 2 : 20 ;
vec_SNR_dB = vec_EbN0_dB + 10 * log10( num_ModemOrder );
vec_BER = zeros( size( vec_EbN0_dB ) );
vec_EVM = zeros( size( vec_EbN0_dB ) );
num_Loop = 2^8;
for cnt_SNR = 1 : numel( vec_SNR_dB )
num_SNR_dB = vec_SNR_dB( cnt_SNR );
num_EbN0_dB = vec_EbN0_dB( cnt_SNR );
num_BitError = 0;
num_EVM = 0;
num_SigVar = 0;
for cnt_Loop = 1 : num_Loop
%% OCDM Transmitter
t_InfoBit = double( rand( num_InfoBit, 1 ) > 0.5 );
t_ModSymbol = qammod( t_InfoBit, 2^num_ModemOrder, ‘InputType’, ‘bit’, ‘UnitAveragePower’, true );
t_ModSignal = xOCDMModem_TX( t_ModSymbol, OCDMParam );
%% Channel Transmission
ch_Signal = t_ModSignal;
% Multipath channel implementation
Ch_MultiPath_Tap = sqrt( 0.5 ) * randn( size( Ch_MultiPath_PDP ) ) + 1i * randn( size( Ch_MultiPath_PDP ) );
Ch_MultiPath_Tap = Ch_MultiPath_PDP .* Ch_MultiPath_Tap;
Ch_MultiPath_CIR = zeros( num_OCDMChirp, 1 );
Ch_MultiPath_CIR( 1 + Ch_MultiPath_DP, : ) = Ch_MultiPath_Tap;
Ch_MultiPath_CFR = fft( Ch_MultiPath_CIR );
ch_MultiPath_Signal = zeros( size( t_ModSignal ), ‘like’, ch_Signal );
for cnt_Path = 1 : Ch_NumTap
ch_MultiPath_Signal = ch_MultiPath_Signal + …
Ch_MultiPath_Tap( cnt_Path ) .* circshift( ch_Signal, [ Ch_MultiPath_DP( cnt_Path ), 0 ] );
end
% Received signal at RF front-end
r_ModSignal = ch_MultiPath_Signal;
r_ModSignal = awgn( r_ModSignal, num_SNR_dB );
%% OCDM Receiver
OCDMChEst_Param.SNR = 10.^( num_SNR_dB ./ 10 );
OCDMChEst_Param.CFR = Ch_MultiPath_CFR;
r_ModSymbol = xOCDMModem_RX( r_ModSignal, OCDMParam, OCDMChEst_Param );
r_InfoBit = qamdemod( r_ModSymbol, 2^num_ModemOrder, ‘OutputType’, ‘bit’, ‘UnitAveragePower’, true );
num_BitError = num_BitError + sum( r_InfoBit ~= t_InfoBit );
num_EVM = num_EVM + mean( abs( r_ModSymbol – t_ModSymbol ) );
num_SigVar = num_SigVar + mean( abs( r_ModSymbol – t_ModSymbol ).^2 );
end
%% Performance Evaluation
num_BER = num_BitError / num_InfoBit / num_Loop;
num_EVM = num_EVM / num_Loop;
num_SigVar = num_SigVar / num_Loop;
vec_BER( cnt_SNR ) = num_BER;
vec_EVM( cnt_SNR ) = num_EVM;
str_PerfPrompt = ‘EbN0 = %.2f dB, EVM = %.2f%%, BER = %.3e (%d errors out of %d bits)n’;
fprintf( str_PerfPrompt, num_EbN0_dB, num_EVM * 100, num_BER, num_BitError, num_InfoBit );
end
%% Results Rendering
vec_TheorBER = berawgn( vec_EbN0_dB, ‘qam’, 2^num_ModemOrder );
semilogy( vec_EbN0_dB, vec_TheorBER, ‘b’, ‘MarkerSize’, 2 ); ocdm, modlation, ber, snr MATLAB Answers — New Questions
How do I update the Network License Manager?
I have a network license, and I would like to know how to update the license manager software and the MATLAB license file on my license server.I have a network license, and I would like to know how to update the license manager software and the MATLAB license file on my license server. I have a network license, and I would like to know how to update the license manager software and the MATLAB license file on my license server. MATLAB Answers — New Questions
A border/perimeter/rectangle around the inset plot, in a subplot environment
In the following subplot environment, how can I draw a red border/perimeter/rectangle around/wrapping the inset plot?
fig = figure;
for i = 1 : 6
subplot(3,2,i)
scatter(rand(1,10),rand(1,10))
end
axes(fig,’Position’,[.1 .2 .2 .2])
plot(1:5,rand(1,5))In the following subplot environment, how can I draw a red border/perimeter/rectangle around/wrapping the inset plot?
fig = figure;
for i = 1 : 6
subplot(3,2,i)
scatter(rand(1,10),rand(1,10))
end
axes(fig,’Position’,[.1 .2 .2 .2])
plot(1:5,rand(1,5)) In the following subplot environment, how can I draw a red border/perimeter/rectangle around/wrapping the inset plot?
fig = figure;
for i = 1 : 6
subplot(3,2,i)
scatter(rand(1,10),rand(1,10))
end
axes(fig,’Position’,[.1 .2 .2 .2])
plot(1:5,rand(1,5)) inset, border, perimeter, wrap, plot, subplot, rectangle MATLAB Answers — New Questions
How to Interface with Test Browser through Command Window
I am wondering if it is possible to use commands to interface with the Test Browser. I have a collection of tests that I would like to run, and I am looking to see if it is possible to add tests to the test browser with a command. From the current documentation, it appears that tests can only be added to the test browser by manually selecting them.
On the same note, I am also wondering if there is a command that can be used to have the same effect as pressing the "Run Current Suite".
I got a hint that something like this may be possible through some error messages, something along the lines of:
"matlab.unittest.internal.testbrowser.TestBrowserActionsService.importFolder"
However, I am wondering if this is a feature that is not accessible to users. Thanks!I am wondering if it is possible to use commands to interface with the Test Browser. I have a collection of tests that I would like to run, and I am looking to see if it is possible to add tests to the test browser with a command. From the current documentation, it appears that tests can only be added to the test browser by manually selecting them.
On the same note, I am also wondering if there is a command that can be used to have the same effect as pressing the "Run Current Suite".
I got a hint that something like this may be possible through some error messages, something along the lines of:
"matlab.unittest.internal.testbrowser.TestBrowserActionsService.importFolder"
However, I am wondering if this is a feature that is not accessible to users. Thanks! I am wondering if it is possible to use commands to interface with the Test Browser. I have a collection of tests that I would like to run, and I am looking to see if it is possible to add tests to the test browser with a command. From the current documentation, it appears that tests can only be added to the test browser by manually selecting them.
On the same note, I am also wondering if there is a command that can be used to have the same effect as pressing the "Run Current Suite".
I got a hint that something like this may be possible through some error messages, something along the lines of:
"matlab.unittest.internal.testbrowser.TestBrowserActionsService.importFolder"
However, I am wondering if this is a feature that is not accessible to users. Thanks! test browser, unit test MATLAB Answers — New Questions
Maintain colors when ploting during a loop using hold on.
Hey, so imtrying to plot 5 lines where each line new value (5 new ‘y’ axes values) are being calculated iterativly using a loop.
I want to add every iteration the new 5 values while to the same exsiting 5 lines with their colors maintaind.
Thus keeping a constant color for 5 lines.
I have written something like this:
%%
figure(1);
hold on;
while (max(abs(dif)) > 1*10^-6)
if (mod(iteration_num,100) == 0)
plot(repmat(iteration_num,1,size),Xr(1:size));
end
iteration_num = iteration_num + 1;
Xr(r) = Xr(r) + k*((1/Xr(r)^alpha) – help);
end
%%
but every time I get inside the loop the plot uses 5 new colors for the new values while I want it to be consistent
Can anyone help me please?
ThanksHey, so imtrying to plot 5 lines where each line new value (5 new ‘y’ axes values) are being calculated iterativly using a loop.
I want to add every iteration the new 5 values while to the same exsiting 5 lines with their colors maintaind.
Thus keeping a constant color for 5 lines.
I have written something like this:
%%
figure(1);
hold on;
while (max(abs(dif)) > 1*10^-6)
if (mod(iteration_num,100) == 0)
plot(repmat(iteration_num,1,size),Xr(1:size));
end
iteration_num = iteration_num + 1;
Xr(r) = Xr(r) + k*((1/Xr(r)^alpha) – help);
end
%%
but every time I get inside the loop the plot uses 5 new colors for the new values while I want it to be consistent
Can anyone help me please?
Thanks Hey, so imtrying to plot 5 lines where each line new value (5 new ‘y’ axes values) are being calculated iterativly using a loop.
I want to add every iteration the new 5 values while to the same exsiting 5 lines with their colors maintaind.
Thus keeping a constant color for 5 lines.
I have written something like this:
%%
figure(1);
hold on;
while (max(abs(dif)) > 1*10^-6)
if (mod(iteration_num,100) == 0)
plot(repmat(iteration_num,1,size),Xr(1:size));
end
iteration_num = iteration_num + 1;
Xr(r) = Xr(r) + k*((1/Xr(r)^alpha) – help);
end
%%
but every time I get inside the loop the plot uses 5 new colors for the new values while I want it to be consistent
Can anyone help me please?
Thanks plot, iteration, color MATLAB Answers — New Questions
Numerical Input in Pop-up box
Hi, I have a code that asks for inputs of numbers from the user. Currently it asks for inputs in the command window, but I would like it to ask in a pop-up box. When I use the inputdlg command it won’t accept the values as numbers for later use, so I was wondering if there is a different way to ask the user for numbers in a menu so that it will know they are numbers.
This is the code that currently works for the command window:
askstartinch="What inch did you start from?n";
start_inch=input(askstartinch);
askendinch="What inch did you end at?n";
end_inch=input(askendinch);
asktrial="What trial number is this?n";
trial=input(asktrial);
This is the code that I tried with the popup boxes, but it won’t accept the values as numbers for later use in the code:
start_inch=inputdlg("What inch did you start from?");
end_inch=inputdlg("What inch did you end at?");
trial=inputdlg("What trial number is this?");
I would perfer the menu to have all 3 questions in popup box, but either way works I just can’t seem to get it work. Thanks!Hi, I have a code that asks for inputs of numbers from the user. Currently it asks for inputs in the command window, but I would like it to ask in a pop-up box. When I use the inputdlg command it won’t accept the values as numbers for later use, so I was wondering if there is a different way to ask the user for numbers in a menu so that it will know they are numbers.
This is the code that currently works for the command window:
askstartinch="What inch did you start from?n";
start_inch=input(askstartinch);
askendinch="What inch did you end at?n";
end_inch=input(askendinch);
asktrial="What trial number is this?n";
trial=input(asktrial);
This is the code that I tried with the popup boxes, but it won’t accept the values as numbers for later use in the code:
start_inch=inputdlg("What inch did you start from?");
end_inch=inputdlg("What inch did you end at?");
trial=inputdlg("What trial number is this?");
I would perfer the menu to have all 3 questions in popup box, but either way works I just can’t seem to get it work. Thanks! Hi, I have a code that asks for inputs of numbers from the user. Currently it asks for inputs in the command window, but I would like it to ask in a pop-up box. When I use the inputdlg command it won’t accept the values as numbers for later use, so I was wondering if there is a different way to ask the user for numbers in a menu so that it will know they are numbers.
This is the code that currently works for the command window:
askstartinch="What inch did you start from?n";
start_inch=input(askstartinch);
askendinch="What inch did you end at?n";
end_inch=input(askendinch);
asktrial="What trial number is this?n";
trial=input(asktrial);
This is the code that I tried with the popup boxes, but it won’t accept the values as numbers for later use in the code:
start_inch=inputdlg("What inch did you start from?");
end_inch=inputdlg("What inch did you end at?");
trial=inputdlg("What trial number is this?");
I would perfer the menu to have all 3 questions in popup box, but either way works I just can’t seem to get it work. Thanks! menu, pop-up, input, output MATLAB Answers — New Questions
Why do these methods to obtain the simulink model transfer functions return different results?
I am trying to learn to use the simulink model linearizer to obtain a transfer function from the following simplified model in MATLAB 2020b:
If I understand the manual correctly, in order to obtain the closed-loop transfer function of the full loop PI/(1+PI*Feedback), the complementary sensitivity analysis point should be applied here:
When applying this at the model output and running the linearizer, the following tf is obtained:
However, the result differs from my own calculations.
When I apply the open-loop input and output however to the loop as follows:
This seems to give me the correct result:
Using these is not always possible in my other complex model however, without ripping it apart. The way I understand the manual, both approaches should be identical. Where am I wrong, what does the complementary sensitivity yield here and what would be the correct way of obtaining the closed loop tf?
My sincere thanks for helping me out with this one…I am trying to learn to use the simulink model linearizer to obtain a transfer function from the following simplified model in MATLAB 2020b:
If I understand the manual correctly, in order to obtain the closed-loop transfer function of the full loop PI/(1+PI*Feedback), the complementary sensitivity analysis point should be applied here:
When applying this at the model output and running the linearizer, the following tf is obtained:
However, the result differs from my own calculations.
When I apply the open-loop input and output however to the loop as follows:
This seems to give me the correct result:
Using these is not always possible in my other complex model however, without ripping it apart. The way I understand the manual, both approaches should be identical. Where am I wrong, what does the complementary sensitivity yield here and what would be the correct way of obtaining the closed loop tf?
My sincere thanks for helping me out with this one… I am trying to learn to use the simulink model linearizer to obtain a transfer function from the following simplified model in MATLAB 2020b:
If I understand the manual correctly, in order to obtain the closed-loop transfer function of the full loop PI/(1+PI*Feedback), the complementary sensitivity analysis point should be applied here:
When applying this at the model output and running the linearizer, the following tf is obtained:
However, the result differs from my own calculations.
When I apply the open-loop input and output however to the loop as follows:
This seems to give me the correct result:
Using these is not always possible in my other complex model however, without ripping it apart. The way I understand the manual, both approaches should be identical. Where am I wrong, what does the complementary sensitivity yield here and what would be the correct way of obtaining the closed loop tf?
My sincere thanks for helping me out with this one… model linearizer, transfer function, simulink MATLAB Answers — New Questions
Simulink 3D matrix interpolation using pre-lookups
I have a 3D (6x5x2) matrix. I’d like to interpolate between ‘surfaces’ along the 3d dimension. To better visualize the problem, one can think of it as a plate with 2 stacked pankaces (each a 6×5 matrix (surface)). I’d like to make a new 5×6 pancake by interpolating between the two stacekd pancakes (along the 3rd dimesion). This needs to be done in Simulink.
I started off by using Matrix Interpolation (MI) block but I realized it would perhaps be more efficient if I directly use pre-lookups + interpolation-using-pre-lookups. See the example below including the .slx file.
In the pre-lookups, for the first 2 dimensions (5×6 –> k1,f1 and k2,f2), I’m enforcing all breakpoints to grab the entire ‘surface’ and simply use the 3rd dimension (x2) to interpolate between the ‘surfaces’. I’m getting port 2 dimension error which I’d appreciate some help to debug.
I’ve also tried using ‘Number of sub-table selection dimensions’ as shows in the second picture below and no success.
I wonder, there should be easier ways of acheiving this given that this is a rather simple operation (interpolation between surfaces)I have a 3D (6x5x2) matrix. I’d like to interpolate between ‘surfaces’ along the 3d dimension. To better visualize the problem, one can think of it as a plate with 2 stacked pankaces (each a 6×5 matrix (surface)). I’d like to make a new 5×6 pancake by interpolating between the two stacekd pancakes (along the 3rd dimesion). This needs to be done in Simulink.
I started off by using Matrix Interpolation (MI) block but I realized it would perhaps be more efficient if I directly use pre-lookups + interpolation-using-pre-lookups. See the example below including the .slx file.
In the pre-lookups, for the first 2 dimensions (5×6 –> k1,f1 and k2,f2), I’m enforcing all breakpoints to grab the entire ‘surface’ and simply use the 3rd dimension (x2) to interpolate between the ‘surfaces’. I’m getting port 2 dimension error which I’d appreciate some help to debug.
I’ve also tried using ‘Number of sub-table selection dimensions’ as shows in the second picture below and no success.
I wonder, there should be easier ways of acheiving this given that this is a rather simple operation (interpolation between surfaces) I have a 3D (6x5x2) matrix. I’d like to interpolate between ‘surfaces’ along the 3d dimension. To better visualize the problem, one can think of it as a plate with 2 stacked pankaces (each a 6×5 matrix (surface)). I’d like to make a new 5×6 pancake by interpolating between the two stacekd pancakes (along the 3rd dimesion). This needs to be done in Simulink.
I started off by using Matrix Interpolation (MI) block but I realized it would perhaps be more efficient if I directly use pre-lookups + interpolation-using-pre-lookups. See the example below including the .slx file.
In the pre-lookups, for the first 2 dimensions (5×6 –> k1,f1 and k2,f2), I’m enforcing all breakpoints to grab the entire ‘surface’ and simply use the 3rd dimension (x2) to interpolate between the ‘surfaces’. I’m getting port 2 dimension error which I’d appreciate some help to debug.
I’ve also tried using ‘Number of sub-table selection dimensions’ as shows in the second picture below and no success.
I wonder, there should be easier ways of acheiving this given that this is a rather simple operation (interpolation between surfaces) simulink, interpolation, pre-lookup, lookup MATLAB Answers — New Questions
Something wrong when I run the project in PX4 Autopilot in Hardware-in-the-Loop (HITL) Simulation with UAV Dynamics in Simulink
I run the project from PX4 Autopilot in Hardware-in-the-Loop (HITL) Simulation with UAV Dynamics in Simulink, it is a example that build flight control algorithem and deploy it into the flight controller, i have set up the Hardware Board to PX4 Pixhawk 4 and click build, deploy and run, and then something wrong came up:
The module ‘Quadcopter_ControllerWithNavigation/Position & Rate Controller/Controller/Quaternion Validity Check/Quaternion Norm’ cannot check out a license. This module requires one of the following licenses: ‘Aerospace Blockset’.
(sorry, i can’t find red text button)
this information came in twice.
I run
license(‘test’, ‘Aerospace_Blockset’)
and the answer is 1,which means it is working(i guess). The reason why the answer is 1, is because i follow the gpt’s instruction, change the path.
How can I fix this problem?
Thank you for your answers.I run the project from PX4 Autopilot in Hardware-in-the-Loop (HITL) Simulation with UAV Dynamics in Simulink, it is a example that build flight control algorithem and deploy it into the flight controller, i have set up the Hardware Board to PX4 Pixhawk 4 and click build, deploy and run, and then something wrong came up:
The module ‘Quadcopter_ControllerWithNavigation/Position & Rate Controller/Controller/Quaternion Validity Check/Quaternion Norm’ cannot check out a license. This module requires one of the following licenses: ‘Aerospace Blockset’.
(sorry, i can’t find red text button)
this information came in twice.
I run
license(‘test’, ‘Aerospace_Blockset’)
and the answer is 1,which means it is working(i guess). The reason why the answer is 1, is because i follow the gpt’s instruction, change the path.
How can I fix this problem?
Thank you for your answers. I run the project from PX4 Autopilot in Hardware-in-the-Loop (HITL) Simulation with UAV Dynamics in Simulink, it is a example that build flight control algorithem and deploy it into the flight controller, i have set up the Hardware Board to PX4 Pixhawk 4 and click build, deploy and run, and then something wrong came up:
The module ‘Quadcopter_ControllerWithNavigation/Position & Rate Controller/Controller/Quaternion Validity Check/Quaternion Norm’ cannot check out a license. This module requires one of the following licenses: ‘Aerospace Blockset’.
(sorry, i can’t find red text button)
this information came in twice.
I run
license(‘test’, ‘Aerospace_Blockset’)
and the answer is 1,which means it is working(i guess). The reason why the answer is 1, is because i follow the gpt’s instruction, change the path.
How can I fix this problem?
Thank you for your answers. simulink, add-on, aerospace blockset MATLAB Answers — New Questions
Copy a user selected folder
I am try to create a prompt where the user can select a folder and then this folder is copied to a new locationsuch as:
file = input(‘What folder would you like to copy?’);
selected_dir = uigetdir();
and the copy the selected folder to a new location: i.e
test Folder source = selected_dir
copyfile(‘test Folder source’,’C:TEMPtest Folder destination’)
if there a clean way to make such a function?I am try to create a prompt where the user can select a folder and then this folder is copied to a new locationsuch as:
file = input(‘What folder would you like to copy?’);
selected_dir = uigetdir();
and the copy the selected folder to a new location: i.e
test Folder source = selected_dir
copyfile(‘test Folder source’,’C:TEMPtest Folder destination’)
if there a clean way to make such a function? I am try to create a prompt where the user can select a folder and then this folder is copied to a new locationsuch as:
file = input(‘What folder would you like to copy?’);
selected_dir = uigetdir();
and the copy the selected folder to a new location: i.e
test Folder source = selected_dir
copyfile(‘test Folder source’,’C:TEMPtest Folder destination’)
if there a clean way to make such a function? prompt, copy, uigetdir MATLAB Answers — New Questions
What to do after generating HDL code?
I have converted my FFT code to HDL using HDL Coder. Now, it has generated many vhd files with hierarchy ranging from 0 to 4. What is supposed to be the next step? How am i supposed to know which file calls which? I have no experience with VHDL.I have converted my FFT code to HDL using HDL Coder. Now, it has generated many vhd files with hierarchy ranging from 0 to 4. What is supposed to be the next step? How am i supposed to know which file calls which? I have no experience with VHDL. I have converted my FFT code to HDL using HDL Coder. Now, it has generated many vhd files with hierarchy ranging from 0 to 4. What is supposed to be the next step? How am i supposed to know which file calls which? I have no experience with VHDL. hdlcoder MATLAB Answers — New Questions
how to specify numbers in an array with varying steps
I want to specify the a group of numbers in an array but they do not appear in even steps.
I want to capture
N1 (1 and 12), N2 (2,3,4,10,11), N3(5,6,7,8,9) and N4 (13, 14)
I understand that to capture N1,and N4 I can specify the individual array numbers, and for N3 I can specify the start and the end and the size of the steps [5:1:9]. I just can’t work out how to specify what I would like in the instance of N2
Please help.
Thanks
AlexI want to specify the a group of numbers in an array but they do not appear in even steps.
I want to capture
N1 (1 and 12), N2 (2,3,4,10,11), N3(5,6,7,8,9) and N4 (13, 14)
I understand that to capture N1,and N4 I can specify the individual array numbers, and for N3 I can specify the start and the end and the size of the steps [5:1:9]. I just can’t work out how to specify what I would like in the instance of N2
Please help.
Thanks
Alex I want to specify the a group of numbers in an array but they do not appear in even steps.
I want to capture
N1 (1 and 12), N2 (2,3,4,10,11), N3(5,6,7,8,9) and N4 (13, 14)
I understand that to capture N1,and N4 I can specify the individual array numbers, and for N3 I can specify the start and the end and the size of the steps [5:1:9]. I just can’t work out how to specify what I would like in the instance of N2
Please help.
Thanks
Alex cell arrays, cell array, cell, vector, vectors MATLAB Answers — New Questions