Answered
Integrate, Load and execute a dll in a Simulink Model
C caller block

6 years ago | 0

Answered
Extract Structure element dynamically
%% s.a=1:10; s.b=rand(1,10); EleNames=fieldnames(s); plot(s.(EleNames{1}),s.(EleNames{2}));

6 years ago | 0

Answered
How can I count how many numbers are different from '-1'?
start with B=A~=-1

6 years ago | 0

Answered
How can I get the full MATLAB Mapping Toolbox? Some functions appear to be missing.
geodensityplot() was introduced in R2018b. https://www.mathworks.com/help/releases/R2019b/matlab/ref/geodensityplot.html

6 years ago | 1

| accepted

Answered
Duplicate Each Element in a Matrix without using Repelem or Repmat
a=eye(2); k=3; d=blkdiag(ones(k,1),ones(k,1)); b=d*a*d' %%Or a more generic case a=[1 2 3;4 5 6]; k=3; [m,n]=size(a);...

6 years ago | 2

| accepted

Answered
Enclosing Multiple Subplots in a Box
In the figure window, click "Insert", "Rectangle". Or % Create figure figure1 = figure; % Create subplot subplot(4,4,1,'P...

6 years ago | 0

Answered
Interweave two arrays in a specific pattern
%% a=(1:32)'; b=(10:10:320)'; %% c=reshape([a,b],16,[]); d=c(:,[1:2:end,2:2:end]); e=d(:) %% better solution from Gui...

6 years ago | 0

Answered
How can I save a variable to external harddisk
save(FileName, Variables). Specify the full path of your file, e.g. 'd:\mydoc\file.mat'

6 years ago | 0

| accepted

Answered
anyone have a clue why roots([1,6,9]) outputs complex numbers?
a is correct. use real(a) to get what you want.

6 years ago | 0

Answered
Simulink.findBlocksOfType for Multiple Types
vdp; Option=Simulink.FindOptions('RegExp',true); Simulink.findBlocks('vdp', 'BlockType','Gain|Outport',Option)

6 years ago | 0

| accepted

Answered
Change value of Simulink parameter inside of test harness to test two different variant subsystems
Just change the value of EST_REF_VEL_RBT_MODE_CFG. When its value is 1, ERVRBTModeHandling is activated. When the value is not 1...

6 years ago | 0

Answered
Processing Big Data Files
Split the large file to smaller files and apply Tall Array

6 years ago | 0

Answered
obtain a matrix out of other matrix
transpose(reshape((1:104)',13,[]))

6 years ago | 0

| accepted

Answered
Where to manually store a path.m file?
When you start MATLAB, the Command window will show you the current folder (default: \document\MATLAB). That is the startup fold...

6 years ago | 0

Answered
Opening a Matlab GUI as a mask of a Simulink block
Block properties, Callbacks, OpenFcn, put in the function that call your GUI. You need to pass the result back to the block usin...

6 years ago | 0

Answered
Simulink 'To File' Block: How to save simulation outputs as distinct vectors
Use "To Workspace" block and then save those variables to a .mat file using "save" command.

6 years ago | 0

| accepted

Answered
simulink undefined funciton or variables
It is a "Mux" block or a "Bus Creator" block.

6 years ago | 0

| accepted

Answered
How to set a system constant to be used in multiple blocks in Simulink
The general approach is to define a parameter (e.g. MyPar1) in base workspace or in a data dictionary, then you can use this par...

6 years ago | 0

| accepted

Answered
getting incorrect simulinkg port specifier error
I was asked to look into a simple Simulink model in R2016 that has the "incorrect Simulink port specifier" error when updating m...

6 years ago | 0

Answered
How to call functions of a C library by C Caller Block in Simulink
This should help. https://www.mathworks.com/help/simulink/ug/integrate-ccode-ccaller.html

6 years ago | 0

Answered
Scope in Simulink showing impossible waveforms
It's because the "Marker". On the Scope, click View, Style. Change the "Marker".

6 years ago | 0

Answered
Simulink gradually changing a value from its original to desired
Use the "Rate Limiter" block

6 years ago | 1

| accepted

Answered
Assign values to a string in Matlab
Y1=X-97

6 years ago | 0

Answered
is it possible to change color of figure ?
a=figure; a.Color='blue'; b=axes; b.Color='red';

6 years ago | 1

| accepted

Answered
Finding non-zero 2-D array
a=[1 3 7; 3 6 9; 0 0 0;2 3 8]; b=a(~all(a==0,2),:);

6 years ago | 0

| accepted

Answered
array of mean from array
a=rand(400); b=mat2cell(a,40*ones(10,1),40*ones(1,10)); c=cellfun(@mean,b,'uni',false); d=cellfun(@mean,c,'uni',false); e=ce...

7 years ago | 1

| accepted

Answered
Why am I getting the complex number in the for loop?
Try not to use variable name i and j. Try this clear all i j or you missed one "*" cos(pi*(2*j+1)/(2*(n+1)))

7 years ago | 0

| accepted

Answered
Finding TargetLink inputs and outputs
Yes. It's better to use tl_find().

7 years ago | 1

| accepted

Answered
How to add a custom library using add_block?
Your syntax is not correct. open_system('SourceLibFileName') add_block('SourceLibFileName/RADAR','DestModelFileName/BlockName'...

7 years ago | 0

Answered
set a variable equal to the count
numel()

7 years ago | 0

| accepted

Load more