Author: PuTI
Error while creating Target starting from reference target ‘Aurix Tricore TC3x’
Hello,
I’m trying to use the Aurix Tricore TC3x Simulink Support Package to work with my TC36 board.
Since the available hardware options are only TC37, TC38, and TC39, I would like to create a new target for the TC36.
Rather than creating a new target from scratch and manually selecting all the features, I’m trying to inherit everything from the existing target and only modify the shared libraries (iLLD), the linker and the loader.
I’m using the following command:
tgt = createTarget(‘my TC36’, ‘Infineon AURIX TC3x’,’C:/TC36_TargetV1′, ‘initialize’)
But I get this error:
Error using matlabshared.targetsdk.Target/loadReferenceTargetObjects
Unable to load reference target ‘Infineon AURIX TC3x’.A table row name subscript must be a character vector, string array, or cell array of
character vectors
Error in matlabshared.targetsdk.Target
Error in createTarget (line 129)
targetObj = matlabshared.targetsdk.Target(name,refTarget,targetFolder,option);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Proceeding, I discovered that the error comes from:
matlabshared.targetsdk.loadTarget(‘Infineon AURIX TC3x’)
That gives the following:
>> matlabshared.targetsdk.loadTarget(‘Infineon AURIX TC3x’)
Error using {} (line 162)
A table row name subscript must be a character vector, string array, or cell array of character vectors
Error in matlabshared.targetsdk.Target/mapFeature
Error in matlabshared.targetsdk.Target/map
Error in matlabshared.targetsdk.Target/addNewBaremetalScheduler
Error in matlabshared.targetsdk.loadTarget
Error in matlabshared.targetsdk.loadTarget
Error in matlabshared.targetsdk.loadTarget
In particular in braceAssign.m on the line 162.
I also tried to use the loadTarget function with the ‘ARM Cortex-A’ target and it worked.
Therefore, The problem can be that I don’t know the exact target name of Infineon AURIX TC3x to use as the reference target, but I also tried to insert a wrong name argument to the loadTarget function and it gives a different result:
matlabshared.targetsdk.loadTarget(‘Infineon’)
Error using matlabshared.targetsdk.loadTarget
The target ‘Infineon’ is not registered. Make sure that the name of the target is correct and that its folders are on the MATLAB path. Also, make
sure to run ‘sl_refresh_customizations’ after you restart MATLAB.
Concluding, how can I use the Infineon AURIX TC3x as reference target?
Thank you!Hello,
I’m trying to use the Aurix Tricore TC3x Simulink Support Package to work with my TC36 board.
Since the available hardware options are only TC37, TC38, and TC39, I would like to create a new target for the TC36.
Rather than creating a new target from scratch and manually selecting all the features, I’m trying to inherit everything from the existing target and only modify the shared libraries (iLLD), the linker and the loader.
I’m using the following command:
tgt = createTarget(‘my TC36’, ‘Infineon AURIX TC3x’,’C:/TC36_TargetV1′, ‘initialize’)
But I get this error:
Error using matlabshared.targetsdk.Target/loadReferenceTargetObjects
Unable to load reference target ‘Infineon AURIX TC3x’.A table row name subscript must be a character vector, string array, or cell array of
character vectors
Error in matlabshared.targetsdk.Target
Error in createTarget (line 129)
targetObj = matlabshared.targetsdk.Target(name,refTarget,targetFolder,option);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Proceeding, I discovered that the error comes from:
matlabshared.targetsdk.loadTarget(‘Infineon AURIX TC3x’)
That gives the following:
>> matlabshared.targetsdk.loadTarget(‘Infineon AURIX TC3x’)
Error using {} (line 162)
A table row name subscript must be a character vector, string array, or cell array of character vectors
Error in matlabshared.targetsdk.Target/mapFeature
Error in matlabshared.targetsdk.Target/map
Error in matlabshared.targetsdk.Target/addNewBaremetalScheduler
Error in matlabshared.targetsdk.loadTarget
Error in matlabshared.targetsdk.loadTarget
Error in matlabshared.targetsdk.loadTarget
In particular in braceAssign.m on the line 162.
I also tried to use the loadTarget function with the ‘ARM Cortex-A’ target and it worked.
Therefore, The problem can be that I don’t know the exact target name of Infineon AURIX TC3x to use as the reference target, but I also tried to insert a wrong name argument to the loadTarget function and it gives a different result:
matlabshared.targetsdk.loadTarget(‘Infineon’)
Error using matlabshared.targetsdk.loadTarget
The target ‘Infineon’ is not registered. Make sure that the name of the target is correct and that its folders are on the MATLAB path. Also, make
sure to run ‘sl_refresh_customizations’ after you restart MATLAB.
Concluding, how can I use the Infineon AURIX TC3x as reference target?
Thank you! Hello,
I’m trying to use the Aurix Tricore TC3x Simulink Support Package to work with my TC36 board.
Since the available hardware options are only TC37, TC38, and TC39, I would like to create a new target for the TC36.
Rather than creating a new target from scratch and manually selecting all the features, I’m trying to inherit everything from the existing target and only modify the shared libraries (iLLD), the linker and the loader.
I’m using the following command:
tgt = createTarget(‘my TC36’, ‘Infineon AURIX TC3x’,’C:/TC36_TargetV1′, ‘initialize’)
But I get this error:
Error using matlabshared.targetsdk.Target/loadReferenceTargetObjects
Unable to load reference target ‘Infineon AURIX TC3x’.A table row name subscript must be a character vector, string array, or cell array of
character vectors
Error in matlabshared.targetsdk.Target
Error in createTarget (line 129)
targetObj = matlabshared.targetsdk.Target(name,refTarget,targetFolder,option);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Proceeding, I discovered that the error comes from:
matlabshared.targetsdk.loadTarget(‘Infineon AURIX TC3x’)
That gives the following:
>> matlabshared.targetsdk.loadTarget(‘Infineon AURIX TC3x’)
Error using {} (line 162)
A table row name subscript must be a character vector, string array, or cell array of character vectors
Error in matlabshared.targetsdk.Target/mapFeature
Error in matlabshared.targetsdk.Target/map
Error in matlabshared.targetsdk.Target/addNewBaremetalScheduler
Error in matlabshared.targetsdk.loadTarget
Error in matlabshared.targetsdk.loadTarget
Error in matlabshared.targetsdk.loadTarget
In particular in braceAssign.m on the line 162.
I also tried to use the loadTarget function with the ‘ARM Cortex-A’ target and it worked.
Therefore, The problem can be that I don’t know the exact target name of Infineon AURIX TC3x to use as the reference target, but I also tried to insert a wrong name argument to the loadTarget function and it gives a different result:
matlabshared.targetsdk.loadTarget(‘Infineon’)
Error using matlabshared.targetsdk.loadTarget
The target ‘Infineon’ is not registered. Make sure that the name of the target is correct and that its folders are on the MATLAB path. Also, make
sure to run ‘sl_refresh_customizations’ after you restart MATLAB.
Concluding, how can I use the Infineon AURIX TC3x as reference target?
Thank you! compiler sdk, embedded coder, infineon aurix tc3x support package, target sdk MATLAB Answers — New Questions
How to extract gray matter volumes based on a specific atlas using SPM and CAT12?
Hi everyone,
I’m new to MATLAB, SPM and CAT12, and I’m learning how to perform Voxel-Based Morphometry .
I’ve already preprocessed a T1-weighted MRI image using CAT12 and obtained TIV statis. Now I’d like to extract regional gray matter volume information from the mwp1.nii file, based on anatomical regions defined by an atlas (e.g., AAL atlas).
Could someone please guide me on how to do this?
Thanks in advance!Hi everyone,
I’m new to MATLAB, SPM and CAT12, and I’m learning how to perform Voxel-Based Morphometry .
I’ve already preprocessed a T1-weighted MRI image using CAT12 and obtained TIV statis. Now I’d like to extract regional gray matter volume information from the mwp1.nii file, based on anatomical regions defined by an atlas (e.g., AAL atlas).
Could someone please guide me on how to do this?
Thanks in advance! Hi everyone,
I’m new to MATLAB, SPM and CAT12, and I’m learning how to perform Voxel-Based Morphometry .
I’ve already preprocessed a T1-weighted MRI image using CAT12 and obtained TIV statis. Now I’d like to extract regional gray matter volume information from the mwp1.nii file, based on anatomical regions defined by an atlas (e.g., AAL atlas).
Could someone please guide me on how to do this?
Thanks in advance! image segmentation, cat12, spm, mri, gray matter MATLAB Answers — New Questions
Can someone help me name all this component Thak youu
name for each componentname for each component name for each component simulink, block diagram MATLAB Answers — New Questions
Clarification with IEC certified tools and the need for separate IEC certification kit
Hi,
As far as I read from the MATLAB website, the tools such as Matlab, Simulink, Embedded Coder,… are already ISO/IEC certified tools, but then, I am confused on the need for separate IEC certification kit available, to qualify those tools? Could you please clarify?
Thanks in advanceHi,
As far as I read from the MATLAB website, the tools such as Matlab, Simulink, Embedded Coder,… are already ISO/IEC certified tools, but then, I am confused on the need for separate IEC certification kit available, to qualify those tools? Could you please clarify?
Thanks in advance Hi,
As far as I read from the MATLAB website, the tools such as Matlab, Simulink, Embedded Coder,… are already ISO/IEC certified tools, but then, I am confused on the need for separate IEC certification kit available, to qualify those tools? Could you please clarify?
Thanks in advance iec61508, iso26262, toolbox, certification MATLAB Answers — New Questions
Ignoring Octave-specific code in Matlab 2024b
I have a following bit of code specific to Octave, in a project that is also meant to be run in Matlab:
if (isOctave())
% Set the tick label precision
set(gca, ‘xticklabel’, cellstr(num2str(get(gca, ‘xtick’) (:), "%.2f"))) %#ok<SBTMP,*ALL>
set(gca, ‘yticklabel’, cellstr(num2str(get(gca, ‘ytick’) (:), "%.2f"))) %#ok<SBTMP,*ALL>
% Set axis font size
set(gca, ‘fontsize’, 12)
end
That particular code is needed for Octave to display figures properly.
And isOctave.m is as follows:
function retval = isOctave
persistent cacheval; % speeds up repeated calls
if isempty (cacheval)
cacheval = (exist ("OCTAVE_VERSION", "builtin") > 0);
end
retval = cacheval;
end
isOctave() has been tested to properly return 0 (false) in Matlab and 1 (true) in Octave.
Now, in Matlab an error message is produced due to the indexing with a colon:
Error: File: foobar.m Line: 117 Column: 41
Invalid array indexing.
And since the code to be executed is guarded with isOctave(), which returns ‘false’, logically that code section should not even be executed in Matlab. So it’s weird that such error is being generated. And it even persist after adding the suppresstion %#ok<SBTMP,*ALL> in there.I have a following bit of code specific to Octave, in a project that is also meant to be run in Matlab:
if (isOctave())
% Set the tick label precision
set(gca, ‘xticklabel’, cellstr(num2str(get(gca, ‘xtick’) (:), "%.2f"))) %#ok<SBTMP,*ALL>
set(gca, ‘yticklabel’, cellstr(num2str(get(gca, ‘ytick’) (:), "%.2f"))) %#ok<SBTMP,*ALL>
% Set axis font size
set(gca, ‘fontsize’, 12)
end
That particular code is needed for Octave to display figures properly.
And isOctave.m is as follows:
function retval = isOctave
persistent cacheval; % speeds up repeated calls
if isempty (cacheval)
cacheval = (exist ("OCTAVE_VERSION", "builtin") > 0);
end
retval = cacheval;
end
isOctave() has been tested to properly return 0 (false) in Matlab and 1 (true) in Octave.
Now, in Matlab an error message is produced due to the indexing with a colon:
Error: File: foobar.m Line: 117 Column: 41
Invalid array indexing.
And since the code to be executed is guarded with isOctave(), which returns ‘false’, logically that code section should not even be executed in Matlab. So it’s weird that such error is being generated. And it even persist after adding the suppresstion %#ok<SBTMP,*ALL> in there. I have a following bit of code specific to Octave, in a project that is also meant to be run in Matlab:
if (isOctave())
% Set the tick label precision
set(gca, ‘xticklabel’, cellstr(num2str(get(gca, ‘xtick’) (:), "%.2f"))) %#ok<SBTMP,*ALL>
set(gca, ‘yticklabel’, cellstr(num2str(get(gca, ‘ytick’) (:), "%.2f"))) %#ok<SBTMP,*ALL>
% Set axis font size
set(gca, ‘fontsize’, 12)
end
That particular code is needed for Octave to display figures properly.
And isOctave.m is as follows:
function retval = isOctave
persistent cacheval; % speeds up repeated calls
if isempty (cacheval)
cacheval = (exist ("OCTAVE_VERSION", "builtin") > 0);
end
retval = cacheval;
end
isOctave() has been tested to properly return 0 (false) in Matlab and 1 (true) in Octave.
Now, in Matlab an error message is produced due to the indexing with a colon:
Error: File: foobar.m Line: 117 Column: 41
Invalid array indexing.
And since the code to be executed is guarded with isOctave(), which returns ‘false’, logically that code section should not even be executed in Matlab. So it’s weird that such error is being generated. And it even persist after adding the suppresstion %#ok<SBTMP,*ALL> in there. matlab, octave, code, portable MATLAB Answers — New Questions
Change in OOP programming between 2014a and 2016 – Structures not recognized anymore?
Hello all,
I’m working on a project that was coded in 2014a version and trying to bring it up the MatLab versions. I tried to bring it from the 2014a to 2016a version but I seem to have an issue with how the Object Oriented Programming files are handled by Matlab.
Here’s a ‘picture’ of my directory :
I have an issue where Matlab says that :
Warning: ‘bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformation’ exceeds MATLAB’s maximum name length of 63 characters
and has been truncated to ‘bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformatio’.
….
Undefined variable "aaa" or class "aaa.bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformatio".
Error in … (line …)
oPlugin = aaa.(sPlugin(6:end))(this, oParent, oGUI, varargin{:});
Has something changed in the way files and folders are handled my Matlab / OOP in the transition from 2014a to 2016a as it’s working in the 2014a version?
Also, I’m going from 2014a to 2023b versions of Matlab. Is a ‘stop’ at the 2016a version before going to the 2023b version worth it?
Thanks !Hello all,
I’m working on a project that was coded in 2014a version and trying to bring it up the MatLab versions. I tried to bring it from the 2014a to 2016a version but I seem to have an issue with how the Object Oriented Programming files are handled by Matlab.
Here’s a ‘picture’ of my directory :
I have an issue where Matlab says that :
Warning: ‘bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformation’ exceeds MATLAB’s maximum name length of 63 characters
and has been truncated to ‘bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformatio’.
….
Undefined variable "aaa" or class "aaa.bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformatio".
Error in … (line …)
oPlugin = aaa.(sPlugin(6:end))(this, oParent, oGUI, varargin{:});
Has something changed in the way files and folders are handled my Matlab / OOP in the transition from 2014a to 2016a as it’s working in the 2014a version?
Also, I’m going from 2014a to 2023b versions of Matlab. Is a ‘stop’ at the 2016a version before going to the 2023b version worth it?
Thanks ! Hello all,
I’m working on a project that was coded in 2014a version and trying to bring it up the MatLab versions. I tried to bring it from the 2014a to 2016a version but I seem to have an issue with how the Object Oriented Programming files are handled by Matlab.
Here’s a ‘picture’ of my directory :
I have an issue where Matlab says that :
Warning: ‘bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformation’ exceeds MATLAB’s maximum name length of 63 characters
and has been truncated to ‘bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformatio’.
….
Undefined variable "aaa" or class "aaa.bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformatio".
Error in … (line …)
oPlugin = aaa.(sPlugin(6:end))(this, oParent, oGUI, varargin{:});
Has something changed in the way files and folders are handled my Matlab / OOP in the transition from 2014a to 2016a as it’s working in the 2014a version?
Also, I’m going from 2014a to 2023b versions of Matlab. Is a ‘stop’ at the 2016a version before going to the 2023b version worth it?
Thanks ! oop, structures MATLAB Answers — New Questions
How do I configure an options file with multiple licenses?
I have multiple licenses for MATLAB that I run off of one license server. How do I direct my users to the appropriate license?I have multiple licenses for MATLAB that I run off of one license server. How do I direct my users to the appropriate license? I have multiple licenses for MATLAB that I run off of one license server. How do I direct my users to the appropriate license? MATLAB Answers — New Questions
Where can I find MATLAB license files?
Where can I find MATLAB license files? Where can I find MATLAB license files? Where can I find MATLAB license files? MATLAB Answers — New Questions
Issues with HDL coder IFFT/FFT Processing with 4×1 Vectors and Data Reordering
I have created an OFDM system where, at the transmitter (Tx) side, I perform IFFT, add a cyclic prefix (CP), and then on the receiver (Rx) side, I perform FFT followed by channel estimation and equalization.
However, I encountered an issue. When I pass scalar values through the IFFT and FFT blocks, everything works fine, and the constellation graph appears as expected. However, my goal is to process data in 4×1 vectors to increase the sampling rate. After processing 4×1 vectors, the constellation graph does not appear correctly, and it seems the data is not in the expected order after the IFFT block.
My question is: when converting data to the time domain with IFFT, does the order of the data change? For example, I expect the data to go through as {0,1,2,3}, {4,5,6,7}, {8,9,10,11}, {12,13,14,15}, etc. But after IFFT, should I expect it to be {0,4,8,12}, {1,5,9,13}, and so on? If this is the case, should I introduce a reordering step after the IFFT to restore the data to its original order?
Additionally, could there be issues related to bit-reversed order, or other similar problems such as "output/input in bit-reversed order"? If you could clarify the meaning of this and how it might affect my system, I would greatly appreciate it.
For your reference, I am using HDL Coder and leveraging the HDL optimized IFFT/FFT blocks in my design.
Finally, I would be grateful if you could provide any resources or further explanations on the index order and the steps needed to process data in vector form, including any additional adjustments I need to make for IFFT/FFT operations.
Thank you very much for your time and assistance. I look forward to your response.I have created an OFDM system where, at the transmitter (Tx) side, I perform IFFT, add a cyclic prefix (CP), and then on the receiver (Rx) side, I perform FFT followed by channel estimation and equalization.
However, I encountered an issue. When I pass scalar values through the IFFT and FFT blocks, everything works fine, and the constellation graph appears as expected. However, my goal is to process data in 4×1 vectors to increase the sampling rate. After processing 4×1 vectors, the constellation graph does not appear correctly, and it seems the data is not in the expected order after the IFFT block.
My question is: when converting data to the time domain with IFFT, does the order of the data change? For example, I expect the data to go through as {0,1,2,3}, {4,5,6,7}, {8,9,10,11}, {12,13,14,15}, etc. But after IFFT, should I expect it to be {0,4,8,12}, {1,5,9,13}, and so on? If this is the case, should I introduce a reordering step after the IFFT to restore the data to its original order?
Additionally, could there be issues related to bit-reversed order, or other similar problems such as "output/input in bit-reversed order"? If you could clarify the meaning of this and how it might affect my system, I would greatly appreciate it.
For your reference, I am using HDL Coder and leveraging the HDL optimized IFFT/FFT blocks in my design.
Finally, I would be grateful if you could provide any resources or further explanations on the index order and the steps needed to process data in vector form, including any additional adjustments I need to make for IFFT/FFT operations.
Thank you very much for your time and assistance. I look forward to your response. I have created an OFDM system where, at the transmitter (Tx) side, I perform IFFT, add a cyclic prefix (CP), and then on the receiver (Rx) side, I perform FFT followed by channel estimation and equalization.
However, I encountered an issue. When I pass scalar values through the IFFT and FFT blocks, everything works fine, and the constellation graph appears as expected. However, my goal is to process data in 4×1 vectors to increase the sampling rate. After processing 4×1 vectors, the constellation graph does not appear correctly, and it seems the data is not in the expected order after the IFFT block.
My question is: when converting data to the time domain with IFFT, does the order of the data change? For example, I expect the data to go through as {0,1,2,3}, {4,5,6,7}, {8,9,10,11}, {12,13,14,15}, etc. But after IFFT, should I expect it to be {0,4,8,12}, {1,5,9,13}, and so on? If this is the case, should I introduce a reordering step after the IFFT to restore the data to its original order?
Additionally, could there be issues related to bit-reversed order, or other similar problems such as "output/input in bit-reversed order"? If you could clarify the meaning of this and how it might affect my system, I would greatly appreciate it.
For your reference, I am using HDL Coder and leveraging the HDL optimized IFFT/FFT blocks in my design.
Finally, I would be grateful if you could provide any resources or further explanations on the index order and the steps needed to process data in vector form, including any additional adjustments I need to make for IFFT/FFT operations.
Thank you very much for your time and assistance. I look forward to your response. hdl coder, ifft, fft MATLAB Answers — New Questions
Matlab App: Get cursor position in axis continuously, keep plot interactivity
Hi there,
I’m trying to create a matlab app in which users can create geometric objects and use them for some calculations later.
These are displayed in a 3D axis, rotated slightly. I am trying to create user functions to draw lines inside that axis. For this, I wan to implement continuously displayed x,y coordinates, or crosshairs or similar, as well as data snapping. Users will only draw 2D objects on the x,y plane. I still want users to be able to rotate the plot, zoom and pan normally with the mouse.
If I use a WindowButtonMotionFcn, then I lose plot interactivity with the mouse. If I use other means of getting the cursor position, like java.awt.MouseInfo.getPointerInfo().getLocation() and getpixelposition() or similar gui coordinate functions, I have to deal with a rotated camera and axis transformation. This makes "hit detection" on the data very cumbersome.
Using axes.CurrentPoint seems useless, because it only updates when the mouse is clicked, not continuously.
Any ideas on how to do this?Hi there,
I’m trying to create a matlab app in which users can create geometric objects and use them for some calculations later.
These are displayed in a 3D axis, rotated slightly. I am trying to create user functions to draw lines inside that axis. For this, I wan to implement continuously displayed x,y coordinates, or crosshairs or similar, as well as data snapping. Users will only draw 2D objects on the x,y plane. I still want users to be able to rotate the plot, zoom and pan normally with the mouse.
If I use a WindowButtonMotionFcn, then I lose plot interactivity with the mouse. If I use other means of getting the cursor position, like java.awt.MouseInfo.getPointerInfo().getLocation() and getpixelposition() or similar gui coordinate functions, I have to deal with a rotated camera and axis transformation. This makes "hit detection" on the data very cumbersome.
Using axes.CurrentPoint seems useless, because it only updates when the mouse is clicked, not continuously.
Any ideas on how to do this? Hi there,
I’m trying to create a matlab app in which users can create geometric objects and use them for some calculations later.
These are displayed in a 3D axis, rotated slightly. I am trying to create user functions to draw lines inside that axis. For this, I wan to implement continuously displayed x,y coordinates, or crosshairs or similar, as well as data snapping. Users will only draw 2D objects on the x,y plane. I still want users to be able to rotate the plot, zoom and pan normally with the mouse.
If I use a WindowButtonMotionFcn, then I lose plot interactivity with the mouse. If I use other means of getting the cursor position, like java.awt.MouseInfo.getPointerInfo().getLocation() and getpixelposition() or similar gui coordinate functions, I have to deal with a rotated camera and axis transformation. This makes "hit detection" on the data very cumbersome.
Using axes.CurrentPoint seems useless, because it only updates when the mouse is clicked, not continuously.
Any ideas on how to do this? appdesigner, app designer, windowbuttonmotionfcn, axes, matlab gui MATLAB Answers — New Questions
Got error in resample function
I am a beginner of Matlab and I was trying to resample y by this resample function
but i got an error: " Incorrect number or types of inputs or outputs for function resample. "
please tell me what is the problem if you know. thanks a lot.
load handel.mat
y = y(:);
Fs = 8192;
fc = 2e5;
Fs_new = ceil( (Fs/2 + fc) / Fs * 2 ) * Fs;
y_resampled = resample(y,Fs_new,Fs);I am a beginner of Matlab and I was trying to resample y by this resample function
but i got an error: " Incorrect number or types of inputs or outputs for function resample. "
please tell me what is the problem if you know. thanks a lot.
load handel.mat
y = y(:);
Fs = 8192;
fc = 2e5;
Fs_new = ceil( (Fs/2 + fc) / Fs * 2 ) * Fs;
y_resampled = resample(y,Fs_new,Fs); I am a beginner of Matlab and I was trying to resample y by this resample function
but i got an error: " Incorrect number or types of inputs or outputs for function resample. "
please tell me what is the problem if you know. thanks a lot.
load handel.mat
y = y(:);
Fs = 8192;
fc = 2e5;
Fs_new = ceil( (Fs/2 + fc) / Fs * 2 ) * Fs;
y_resampled = resample(y,Fs_new,Fs); resample, matlab, error MATLAB Answers — New Questions
How to generate custom unoptimized code within a system composer software architecture model?
C-function code generation appears to work differently when generating code inside of a system composer software architecture model isntead of a standalone simulink model. I am trying to insert certain processer primitaves (mutexes) into my simulink model such that it is incorporated into the autogenerated code. It is a few simple lines of c++ code, so I opted to use the C-function block. In both cases, I have specified in the c-function dialogue window "Generate code as-is (optimizations off)"
Inside of an export-function simulink model, I created a c-function block that includes a comment and then a simple line of code, which generates correctly:
However, if I copy this exact same c-function into an export-function model within a system composer software architecture model, it no longer generates my my specified code. Instead, it generates function calls but does not define the functions anywhere. (Even doing a simple text search of my entire workspace only shows that the function call shown below gets generated).C-function code generation appears to work differently when generating code inside of a system composer software architecture model isntead of a standalone simulink model. I am trying to insert certain processer primitaves (mutexes) into my simulink model such that it is incorporated into the autogenerated code. It is a few simple lines of c++ code, so I opted to use the C-function block. In both cases, I have specified in the c-function dialogue window "Generate code as-is (optimizations off)"
Inside of an export-function simulink model, I created a c-function block that includes a comment and then a simple line of code, which generates correctly:
However, if I copy this exact same c-function into an export-function model within a system composer software architecture model, it no longer generates my my specified code. Instead, it generates function calls but does not define the functions anywhere. (Even doing a simple text search of my entire workspace only shows that the function call shown below gets generated). C-function code generation appears to work differently when generating code inside of a system composer software architecture model isntead of a standalone simulink model. I am trying to insert certain processer primitaves (mutexes) into my simulink model such that it is incorporated into the autogenerated code. It is a few simple lines of c++ code, so I opted to use the C-function block. In both cases, I have specified in the c-function dialogue window "Generate code as-is (optimizations off)"
Inside of an export-function simulink model, I created a c-function block that includes a comment and then a simple line of code, which generates correctly:
However, if I copy this exact same c-function into an export-function model within a system composer software architecture model, it no longer generates my my specified code. Instead, it generates function calls but does not define the functions anywhere. (Even doing a simple text search of my entire workspace only shows that the function call shown below gets generated). software architecture models, c-functions, export-function models, embedded coder, system composer MATLAB Answers — New Questions
When using a writetable to write a table file containing data in datetime format to Excel, the saved datetime data in Excel is not in the same format as the datetime data
The table data is as follows:
Use the following writetable function code to save data to Excel,the exported result is shown in the following figure:
The time display is incomplete.
How to set the exported time format to be the same as the original data?
writetable(T, filePath);The table data is as follows:
Use the following writetable function code to save data to Excel,the exported result is shown in the following figure:
The time display is incomplete.
How to set the exported time format to be the same as the original data?
writetable(T, filePath); The table data is as follows:
Use the following writetable function code to save data to Excel,the exported result is shown in the following figure:
The time display is incomplete.
How to set the exported time format to be the same as the original data?
writetable(T, filePath); writetable,datetime,excel MATLAB Answers — New Questions
Plot along line from. PDE solution
The code below solves a 1-D, transient heat transfer problem set up as in general PDE format. The solution is plotted in color across the domain from 0 to 0.1 after 10 seconds have elapsed. What is the best way to plot the temperature across the length of this domain at this final time?
Thanks
clear all;
%% Create transient thermal model
thermalmodel = createpde(1);
R1= [3,4,0,0.1,0.1,0,0,0,1,1]’;
gd= [R1];
sf= ‘R1’;
ns = char(‘R1’);
ns = ns’;
dl = decsg(gd,sf,ns);
%% Create & plot geometry
geometryFromEdges(thermalmodel,dl);
pdegplot(thermalmodel,"EdgeLabels","on","FaceLabels","on")
xlim([0 0.1])
ylim([-1 1])
% axis equal
%% Generate and plot mesh
generateMesh(thermalmodel)
figure
pdemesh(thermalmodel)
title("Mesh with Quadratic Triangular Elements")
%% Apply BCs
% Edge 4 is left edge; Edge 2 is right side
applyBoundaryCondition(thermalmodel, "dirichlet",Edge=[4],u=100);
applyBoundaryCondition(thermalmodel, "dirichlet",Edge=[2],u=20);
%% Apply thermal properties [copper]
rho= 8933 %
cp= 385 %
rhocp= rho*cp %
k= 401 % W/mK
%% Define uniform volumetric heat generation rate
Qgen= 0 % W/m3
%% Define coefficients for generic Governing Equation to be solved
m= 0
a= 0
d= rhocp
c= [k]
f= [Qgen]
specifyCoefficients(thermalmodel, m=0, d=rhocp, c=k, a=0, f=f);
%% Apply initial condition
setInitialConditions(thermalmodel, 20);
%% Define time limits
tlist= 0: 1: 10;
thermalresults= solvepde(thermalmodel, tlist);
% Plot results
sol = thermalresults.NodalSolution;
subplot(2,2,1)
pdeplot(thermalmodel,"XYData",sol(:,11), …
"Contour","on",…
"ColorMap","jet")The code below solves a 1-D, transient heat transfer problem set up as in general PDE format. The solution is plotted in color across the domain from 0 to 0.1 after 10 seconds have elapsed. What is the best way to plot the temperature across the length of this domain at this final time?
Thanks
clear all;
%% Create transient thermal model
thermalmodel = createpde(1);
R1= [3,4,0,0.1,0.1,0,0,0,1,1]’;
gd= [R1];
sf= ‘R1’;
ns = char(‘R1’);
ns = ns’;
dl = decsg(gd,sf,ns);
%% Create & plot geometry
geometryFromEdges(thermalmodel,dl);
pdegplot(thermalmodel,"EdgeLabels","on","FaceLabels","on")
xlim([0 0.1])
ylim([-1 1])
% axis equal
%% Generate and plot mesh
generateMesh(thermalmodel)
figure
pdemesh(thermalmodel)
title("Mesh with Quadratic Triangular Elements")
%% Apply BCs
% Edge 4 is left edge; Edge 2 is right side
applyBoundaryCondition(thermalmodel, "dirichlet",Edge=[4],u=100);
applyBoundaryCondition(thermalmodel, "dirichlet",Edge=[2],u=20);
%% Apply thermal properties [copper]
rho= 8933 %
cp= 385 %
rhocp= rho*cp %
k= 401 % W/mK
%% Define uniform volumetric heat generation rate
Qgen= 0 % W/m3
%% Define coefficients for generic Governing Equation to be solved
m= 0
a= 0
d= rhocp
c= [k]
f= [Qgen]
specifyCoefficients(thermalmodel, m=0, d=rhocp, c=k, a=0, f=f);
%% Apply initial condition
setInitialConditions(thermalmodel, 20);
%% Define time limits
tlist= 0: 1: 10;
thermalresults= solvepde(thermalmodel, tlist);
% Plot results
sol = thermalresults.NodalSolution;
subplot(2,2,1)
pdeplot(thermalmodel,"XYData",sol(:,11), …
"Contour","on",…
"ColorMap","jet") The code below solves a 1-D, transient heat transfer problem set up as in general PDE format. The solution is plotted in color across the domain from 0 to 0.1 after 10 seconds have elapsed. What is the best way to plot the temperature across the length of this domain at this final time?
Thanks
clear all;
%% Create transient thermal model
thermalmodel = createpde(1);
R1= [3,4,0,0.1,0.1,0,0,0,1,1]’;
gd= [R1];
sf= ‘R1’;
ns = char(‘R1’);
ns = ns’;
dl = decsg(gd,sf,ns);
%% Create & plot geometry
geometryFromEdges(thermalmodel,dl);
pdegplot(thermalmodel,"EdgeLabels","on","FaceLabels","on")
xlim([0 0.1])
ylim([-1 1])
% axis equal
%% Generate and plot mesh
generateMesh(thermalmodel)
figure
pdemesh(thermalmodel)
title("Mesh with Quadratic Triangular Elements")
%% Apply BCs
% Edge 4 is left edge; Edge 2 is right side
applyBoundaryCondition(thermalmodel, "dirichlet",Edge=[4],u=100);
applyBoundaryCondition(thermalmodel, "dirichlet",Edge=[2],u=20);
%% Apply thermal properties [copper]
rho= 8933 %
cp= 385 %
rhocp= rho*cp %
k= 401 % W/mK
%% Define uniform volumetric heat generation rate
Qgen= 0 % W/m3
%% Define coefficients for generic Governing Equation to be solved
m= 0
a= 0
d= rhocp
c= [k]
f= [Qgen]
specifyCoefficients(thermalmodel, m=0, d=rhocp, c=k, a=0, f=f);
%% Apply initial condition
setInitialConditions(thermalmodel, 20);
%% Define time limits
tlist= 0: 1: 10;
thermalresults= solvepde(thermalmodel, tlist);
% Plot results
sol = thermalresults.NodalSolution;
subplot(2,2,1)
pdeplot(thermalmodel,"XYData",sol(:,11), …
"Contour","on",…
"ColorMap","jet") plotting MATLAB Answers — New Questions
Aqua Security Achieves FedRAMP® High Authorization
Aqua Security’s Cloud Native Application Protection Platform (CNAPP) has achieved FedRAMP® High Impact Authorization, making Aqua one of the few CNAPP providers authorized at the highest level of federal cloud security compliance. This milestone opens the door for U.S. federal agencies, commercial organizations that require FedRAMP High, and cloud service providers operating in FedRAMP-authorized environments to confidently use Aqua’s platform for securing their cloud native applications.
Aqua Security’s Cloud Native Application Protection Platform (CNAPP) has achieved FedRAMP® High Impact Authorization, making Aqua one of the few CNAPP providers authorized at the highest level of federal cloud security compliance. This milestone opens the door for U.S. federal agencies, commercial organizations that require FedRAMP High, and cloud service providers operating in FedRAMP-authorized environments to confidently use Aqua’s platform for securing their cloud native applications.
Read More
Code generation and stateflow transition variant
Hello,
Is the code generation tunable with a transition variant, set with "Variant Activation Time = Code compile" with r2024b?
Indeed, I have a compilation warning with my generated code. The code generation creates a static function with #if inside the function:
This way, the compilation gives a compilation warning saying that there is a function defined but not used.
If you have a solution, I am interested.
Regards,
JeanHello,
Is the code generation tunable with a transition variant, set with "Variant Activation Time = Code compile" with r2024b?
Indeed, I have a compilation warning with my generated code. The code generation creates a static function with #if inside the function:
This way, the compilation gives a compilation warning saying that there is a function defined but not used.
If you have a solution, I am interested.
Regards,
Jean Hello,
Is the code generation tunable with a transition variant, set with "Variant Activation Time = Code compile" with r2024b?
Indeed, I have a compilation warning with my generated code. The code generation creates a static function with #if inside the function:
This way, the compilation gives a compilation warning saying that there is a function defined but not used.
If you have a solution, I am interested.
Regards,
Jean variant, code generation MATLAB Answers — New Questions
How to use cell value as a variable or How to convert cell to double?
I have data in excel, I am reading that data in MATLAB. I want to use text in excel as a variable name to assign fixed set of data values which also in same excel. but I am facing the problem as the text from excel has class cell.
So, how can I use cell values (Time, Temperatue….etc) as a variable in MATLAB?I have data in excel, I am reading that data in MATLAB. I want to use text in excel as a variable name to assign fixed set of data values which also in same excel. but I am facing the problem as the text from excel has class cell.
So, how can I use cell values (Time, Temperatue….etc) as a variable in MATLAB? I have data in excel, I am reading that data in MATLAB. I want to use text in excel as a variable name to assign fixed set of data values which also in same excel. but I am facing the problem as the text from excel has class cell.
So, how can I use cell values (Time, Temperatue….etc) as a variable in MATLAB? cell, variable, evil, eval, antipattern, anti-pattern MATLAB Answers — New Questions
Discrepancy in Peak Temperature Between Simulation and Experiment in 4s3p NCA Battery Pack
Hi everyone,
I’m currently working on the simulation of a 4s3p battery pack using Molicel INR-21700-P45B cells (NCA chemistry). The pack undergoes full charge and discharge cycles (from 3.0 V to 4.2 V per cell) under natural convection conditions, for 10 cycles at both 1C and 1.5C rates.
The charge protocol includes CCCV charging, followed by a 30-minute rest, then CC discharging, and another 30-minute rest. In the simulation, the peak temperature during discharging is higher than during charging. However, in our experimental results, the opposite is observed—the peak temperature is higher during charging.
For the simulation, we used the OCV curve of a single cell multiplied by 4 for the 4s configuration.
Has anyone encountered a similar issue or could provide insights into why the simulated thermal behavior might differ from experimental results?Hi everyone,
I’m currently working on the simulation of a 4s3p battery pack using Molicel INR-21700-P45B cells (NCA chemistry). The pack undergoes full charge and discharge cycles (from 3.0 V to 4.2 V per cell) under natural convection conditions, for 10 cycles at both 1C and 1.5C rates.
The charge protocol includes CCCV charging, followed by a 30-minute rest, then CC discharging, and another 30-minute rest. In the simulation, the peak temperature during discharging is higher than during charging. However, in our experimental results, the opposite is observed—the peak temperature is higher during charging.
For the simulation, we used the OCV curve of a single cell multiplied by 4 for the 4s configuration.
Has anyone encountered a similar issue or could provide insights into why the simulated thermal behavior might differ from experimental results? Hi everyone,
I’m currently working on the simulation of a 4s3p battery pack using Molicel INR-21700-P45B cells (NCA chemistry). The pack undergoes full charge and discharge cycles (from 3.0 V to 4.2 V per cell) under natural convection conditions, for 10 cycles at both 1C and 1.5C rates.
The charge protocol includes CCCV charging, followed by a 30-minute rest, then CC discharging, and another 30-minute rest. In the simulation, the peak temperature during discharging is higher than during charging. However, in our experimental results, the opposite is observed—the peak temperature is higher during charging.
For the simulation, we used the OCV curve of a single cell multiplied by 4 for the 4s configuration.
Has anyone encountered a similar issue or could provide insights into why the simulated thermal behavior might differ from experimental results? simscape, simulation MATLAB Answers — New Questions
errors when generating certain motions of Revolute Joint in simMechanics
The model:
<</matlabcentral/answers/uploaded_files/27438/3.PNG>>
The simMechanics system is as follow:
<</matlabcentral/answers/uploaded_files/27436/1.PNG>>
simin is input from workspace and is the motion of Revolute Joint as the time goes on.
<</matlabcentral/answers/uploaded_files/27437/2.PNG>>
But it shows some kind of error:
In the dynamically coupled component containing Revolute Joint Revolute_Joint, there are fewer joint primitive degrees of freedom with automatically computed force or torque (0) than with motion from inputs (1). The prescribed motion trajectories in this component may not be achievable. Solve this problem by reducing the number of joint primitives with motion from inputs or increasing the number of joint primitives with automatically computed force or torque. Resolve this issue in order to simulate the model.
Does anybody knows what’s wrong and what should I do to solve the problem.The model:
<</matlabcentral/answers/uploaded_files/27438/3.PNG>>
The simMechanics system is as follow:
<</matlabcentral/answers/uploaded_files/27436/1.PNG>>
simin is input from workspace and is the motion of Revolute Joint as the time goes on.
<</matlabcentral/answers/uploaded_files/27437/2.PNG>>
But it shows some kind of error:
In the dynamically coupled component containing Revolute Joint Revolute_Joint, there are fewer joint primitive degrees of freedom with automatically computed force or torque (0) than with motion from inputs (1). The prescribed motion trajectories in this component may not be achievable. Solve this problem by reducing the number of joint primitives with motion from inputs or increasing the number of joint primitives with automatically computed force or torque. Resolve this issue in order to simulate the model.
Does anybody knows what’s wrong and what should I do to solve the problem. The model:
<</matlabcentral/answers/uploaded_files/27438/3.PNG>>
The simMechanics system is as follow:
<</matlabcentral/answers/uploaded_files/27436/1.PNG>>
simin is input from workspace and is the motion of Revolute Joint as the time goes on.
<</matlabcentral/answers/uploaded_files/27437/2.PNG>>
But it shows some kind of error:
In the dynamically coupled component containing Revolute Joint Revolute_Joint, there are fewer joint primitive degrees of freedom with automatically computed force or torque (0) than with motion from inputs (1). The prescribed motion trajectories in this component may not be achievable. Solve this problem by reducing the number of joint primitives with motion from inputs or increasing the number of joint primitives with automatically computed force or torque. Resolve this issue in order to simulate the model.
Does anybody knows what’s wrong and what should I do to solve the problem. simulink, simmechanics MATLAB Answers — New Questions
how can I add a point in figure?
Hi,
I want to add a point to this figure. Can you please tell me how to do that ?
the point that I want to add to my figure is: x=70.00; y= 0.30. Thanks for your time.Hi,
I want to add a point to this figure. Can you please tell me how to do that ?
the point that I want to add to my figure is: x=70.00; y= 0.30. Thanks for your time. Hi,
I want to add a point to this figure. Can you please tell me how to do that ?
the point that I want to add to my figure is: x=70.00; y= 0.30. Thanks for your time. matlab, figure MATLAB Answers — New Questions