Christopher Wallace
Followers: 0 Following: 0
Feeds
已回答
Convert String to Expression for IF Statement
Check out the 'eval' function. https://www.mathworks.com/help/matlab/ref/eval.html
Convert String to Expression for IF Statement
Check out the 'eval' function. https://www.mathworks.com/help/matlab/ref/eval.html
5 years 前 | 0
已回答
How can I generate a uint8 type output from the Pulse Generator block in Simulink?
Can you use a gain block with the output data type specified as 'uint8' or does that produce the same results as the convert blo...
How can I generate a uint8 type output from the Pulse Generator block in Simulink?
Can you use a gain block with the output data type specified as 'uint8' or does that produce the same results as the convert blo...
6 years 前 | 1
已回答
Problems updating variable on the callback of a timer
Use the 'UserData' property of the timer to access data set within the timer function. <https://www.mathworks.com/help/matlab...
Problems updating variable on the callback of a timer
Use the 'UserData' property of the timer to access data set within the timer function. <https://www.mathworks.com/help/matlab...
6 years 前 | 0
已回答
Vectorized method to sum missed one values
startingData = [0, 1, 1, 0, 0, 1, 0, 1]; stringArr = sprintf('%d', startingData ); % Convert to string for use with regexp ...
Vectorized method to sum missed one values
startingData = [0, 1, 1, 0, 0, 1, 0, 1]; stringArr = sprintf('%d', startingData ); % Convert to string for use with regexp ...
6 years 前 | 0
已回答
how to convert .dat and .mdf files into .mat files in matlab
What version of Matlab are you using. If it's 2016b or beyond check out: <https://www.mathworks.com/help/vnt/ug/mdf.html> Ot...
how to convert .dat and .mdf files into .mat files in matlab
What version of Matlab are you using. If it's 2016b or beyond check out: <https://www.mathworks.com/help/vnt/ug/mdf.html> Ot...
6 years 前 | 0
| 已接受
已回答
Get port name along with number
simBlockH = get_param('LaneA_ICD_Fccroot', 'Handle') handles = find_system(simBlockH, 'LookUnderMasks', 'on', 'FollowLinks'...
Get port name along with number
simBlockH = get_param('LaneA_ICD_Fccroot', 'Handle') handles = find_system(simBlockH, 'LookUnderMasks', 'on', 'FollowLinks'...
6 years 前 | 1
| 已接受
已回答
How to slice each string in a string array without using for loop
chardata = cell2mat(a); numdata = str2num(chardata(:,6:7));
How to slice each string in a string array without using for loop
chardata = cell2mat(a); numdata = str2num(chardata(:,6:7));
6 years 前 | 2
已回答
how do I extract part of a cell of string values?
You could use a cell function. cellfun(@(x) x(end-3:end), your_var, 'UniformOutput', false)
how do I extract part of a cell of string values?
You could use a cell function. cellfun(@(x) x(end-3:end), your_var, 'UniformOutput', false)
6 years 前 | 1
已回答
Failing to find a string on a cell of strings using strcmp
Try using 'regexp' curr_recs_idx = regexp(record_groups_hrs,['_',curr_hr, '\>'])
Failing to find a string on a cell of strings using strcmp
Try using 'regexp' curr_recs_idx = regexp(record_groups_hrs,['_',curr_hr, '\>'])
6 years 前 | 1
| 已接受
已回答
How to send result from block (Simulink) to the Workplace (not array) ?
In the 'To Workspace' block select 'Array' as the output type instead of 'Timeseries'
How to send result from block (Simulink) to the Workplace (not array) ?
In the 'To Workspace' block select 'Array' as the output type instead of 'Timeseries'
6 years 前 | 0
| 已接受
已回答
Trying to calculate a volume by changing equation for volume for different variable parameter
Hi Alison, You're using the array 'h' in your if else statement which as written doesn't satisfy any of the conditions causin...
Trying to calculate a volume by changing equation for volume for different variable parameter
Hi Alison, You're using the array 'h' in your if else statement which as written doesn't satisfy any of the conditions causin...
6 years 前 | 0
已回答
How can I get the output and input names of all my subsystem blocks in my simulink model?
Yes. What have you tried so far? Something like this should work. rootHdl = get_param(bdroot, 'Handle'); sysIns ...
How can I get the output and input names of all my subsystem blocks in my simulink model?
Yes. What have you tried so far? Something like this should work. rootHdl = get_param(bdroot, 'Handle'); sysIns ...
6 years 前 | 2
| 已接受
已回答
How to batch editing scope parameters in Simulink with model explorer(Model explorer does not show some properties of Scope)
I'm not sure about Model Explorer, what version of Matlab are you using? I tried on 2017a and it seemed to work fine. Another...
How to batch editing scope parameters in Simulink with model explorer(Model explorer does not show some properties of Scope)
I'm not sure about Model Explorer, what version of Matlab are you using? I tried on 2017a and it seemed to work fine. Another...
6 years 前 | 0
| 已接受
已回答
Listbox showing variables with for loop
There are a few ways to create a GUI. For this example I'm using <https://www.mathworks.com/help/matlab/creating_guis/about-the-...
Listbox showing variables with for loop
There are a few ways to create a GUI. For this example I'm using <https://www.mathworks.com/help/matlab/creating_guis/about-the-...
6 years 前 | 0
已回答
Iterate over vector from result of a for loop
Here's one solution: % Number of iterations numberOfLoops = 10; amountToSubtract = 480; % Create an intial mat...
Iterate over vector from result of a for loop
Here's one solution: % Number of iterations numberOfLoops = 10; amountToSubtract = 480; % Create an intial mat...
6 years 前 | 1
已回答
Sort data from text file into columns
fid = fopen('yourTxt.txt'); A = []; tline = fgetl(fid); ii = 1; jj = 1; while ischar(tline) while ~isemp...
Sort data from text file into columns
fid = fopen('yourTxt.txt'); A = []; tline = fgetl(fid); ii = 1; jj = 1; while ischar(tline) while ~isemp...
6 years 前 | 1
| 已接受
已回答
How do I get the port names of a block based on their port handles?
Select the subsystem and then use the following code: find_system(gcb, 'SearchDepth', 1, 'BlockType', 'Inport') find_sys...
How do I get the port names of a block based on their port handles?
Select the subsystem and then use the following code: find_system(gcb, 'SearchDepth', 1, 'BlockType', 'Inport') find_sys...
6 years 前 | 0
已回答
In Simulink, is there a way to highlight a specific part of a circuit with a different coloured circuit lines
Yes, you can use the 'hilite_system' function. If you want to highlight only pieces of the model you selected you would first...
In Simulink, is there a way to highlight a specific part of a circuit with a different coloured circuit lines
Yes, you can use the 'hilite_system' function. If you want to highlight only pieces of the model you selected you would first...
6 years 前 | 0
| 已接受
已回答
How to use the break in a loop?
Hi Taylor, The problem with the 'break' statement is that you have 2 loops executing, a *while* loop and a *for* loop. Whe...
How to use the break in a loop?
Hi Taylor, The problem with the 'break' statement is that you have 2 loops executing, a *while* loop and a *for* loop. Whe...
6 years 前 | 0
| 已接受
已回答
I'm attempting to determine the maximum value of a signal (SIMULINK) . The max block returns the exact same signal back to me. What can I do to extract the maximum value?
If you want to do it purely in Simulink you could do something like this: <</matlabcentral/answers/uploaded_files/125495/2018...
I'm attempting to determine the maximum value of a signal (SIMULINK) . The max block returns the exact same signal back to me. What can I do to extract the maximum value?
If you want to do it purely in Simulink you could do something like this: <</matlabcentral/answers/uploaded_files/125495/2018...
6 years 前 | 0
| 已接受
已回答
How import file csv with vertical header
Hi Agnes, One way you could accomplish this is to first convert your data into an array and then transpose it. a = readt...
How import file csv with vertical header
Hi Agnes, One way you could accomplish this is to first convert your data into an array and then transpose it. a = readt...
6 years 前 | 0
已回答
How to insert a row into multiple fields (within a structure)
Mat, I've created dummy data that from what you're saying is similar in structure to what you use. The result of the code...
How to insert a row into multiple fields (within a structure)
Mat, I've created dummy data that from what you're saying is similar in structure to what you use. The result of the code...
6 years 前 | 0
| 已接受
已回答
How can I write to a CSV file in separated columns and without any commas?
csvwrite('matlabdandata2.csv', [frames, time, cycle])
How can I write to a CSV file in separated columns and without any commas?
csvwrite('matlabdandata2.csv', [frames, time, cycle])
6 years 前 | 0
已回答
Reading workspace variable from a .fig file
Hi Vamsi, Firstly, yes, you can access workspace variables from within with a GUI. Check out the 'evalin' function. The defau...
Reading workspace variable from a .fig file
Hi Vamsi, Firstly, yes, you can access workspace variables from within with a GUI. Check out the 'evalin' function. The defau...
6 years 前 | 1
| 已接受
已回答
How to save multiple tables in seperate sheets in Excel
Hi Victoria, Have you looked into the documentation for the Matlab command <https://www.mathworks.com/help/matlab/ref/xlswrit...
How to save multiple tables in seperate sheets in Excel
Hi Victoria, Have you looked into the documentation for the Matlab command <https://www.mathworks.com/help/matlab/ref/xlswrit...
6 years 前 | 0
已回答
Adding Toggle Switch programmatically
Hi Osama, If I understand you correctly you could use the following code as an example: add_block('simulink/Sources/Consta...
Adding Toggle Switch programmatically
Hi Osama, If I understand you correctly you could use the following code as an example: add_block('simulink/Sources/Consta...
6 years 前 | 1
| 已接受