Beantwortet
How does Simulink Selector block work to extract dimension MxN matrix into 1xN row vectors?
Are you sure? I tried as your example and there is no error. The error happened in "Selector1" yet the dialog show "Selector2" a...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
How do you split up a matrix into 2 matrices where the rows are made up of the rows from the initial matrix containing certain numbers?
Contain77InRow=any(J==77,2); A=J(Contain77InRow,:) B=J(~Contain77InRow,:)

fast 8 Jahre vor | 2

| akzeptiert

Beantwortet
Why is exist(variable,'var') not seeing a variable?
exist('signedOrNot','var')

fast 8 Jahre vor | 3

| akzeptiert

Beantwortet
MATLAB version 2018b provides a different exception identifier for the same situation than version 2017b did. Can you suggest the easiest way to handle this that works for both versions?
You didn't identify other errors. Is it necessary to identify this error, or you just simply need to catch an errors. Anyway,...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to compare a number with values of a vector?
A = [20 40 60 80 100 120]; x=30; lowB=interp1(A,A,x,'previous') HighB=interp1(A,A,x,'next')

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to combine structures with the same name fields?
Did you try New=[xswn; xsw_]

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to change storage class
use get() and set(), instead of get_param() and set_param()

fast 8 Jahre vor | 0

Beantwortet
How many times each element of an array have the 1 value after n times assigned different logical values?
Constructing your data as 3d matrix will make it easy. %% A(1,:,:) =[ 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 1 1 ...

fast 8 Jahre vor | 0

Beantwortet
Reusing Signal Builder Generator in another Simulink model
Viewers and generators are not blocks. One way to resolve this: 1. "Select All" and delete all the blocks in your current mod...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
Simulink mask display programmatically, how to make line shift?
use char(10), set_param( gcbh,'MaskDisplay', ['port_label(''input'', 1, ''in1'');',char(10),'port_label(''output'', 1, ''ou...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
How can I list file-paths from different subfolders?
You can use f=dir('C:/directory01/person*/subdirectory02/file01.x')

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
S-function does not exist error!
run "mex -setup" to select VC2017 as the compiler and then run mex.

fast 8 Jahre vor | 0

Beantwortet
How to use DIR to extract file data (name, date, location/address/transit) from multiple folders and subfolders?
x=dir(fullfile(MyFolder,'**/*.*')) will give you all the files and folders in MyFolder and all its subfolders.

fast 8 Jahre vor | 2

| akzeptiert

Beantwortet
Where do I find files for simulink tutorials?
That web page is for R2018b document. What are you looking for? For Simulink tutorial in your version, type web(fullfile(doc...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
Saving struct to an Excel file
You can take a look at the example in the document. Use rmfield() to remove the first three fields. Since all the other fields a...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
Select xlim max-value
max() is a function. Don't use it as a variable name. xmax=max(xlim)

fast 8 Jahre vor | 1

| akzeptiert

Beantwortet
How to write a simple MATLAB code for simplification of if.. else.. code
Now I think your problem has nothing to do with the increasing or decreasing of the values in x. Rather, it is to lookup and "ma...

fast 8 Jahre vor | 0

Beantwortet
Matlab command window result in one line , even wrap text views the output in an non organized way.
use '\n' in fprintf() fprintf('a1\nb2\nc3\n')

fast 8 Jahre vor | 0

Beantwortet
Can we find simulink signal object used in the model using Simulink.findVars?
Yes. Make a simple example and you can find it out. Updated in March 2024 using MATLAB R2022b. Make a simple Simulink model, f...

fast 8 Jahre vor | 0

Beantwortet
How do I determine the names and idicies of worksheets in an Excel file using ActiveX?
I suggest N_Sheets=ewb.Sheets.Count; for k=1:N_Sheets ewb.Sheets.Item(k).Name end

fast 8 Jahre vor | 1

| akzeptiert

Beantwortet
How to write a simple MATLAB code for simplification of if.. else.. code
x=10:10:100; xp=29; n=numel(x); interp1([-realmax,x,realmax],[1,1:n,n],xp,'previous')

fast 8 Jahre vor | 0

Beantwortet
How to comment on a simulink subsystem as shown in the figure?
That is not really a "comment". Most likely, it is a mask display. If you select the block, right click, select "Mask" then "Edi...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
How do I add superscript numbers to a CSV-File with fprintf?
CSV file can not contain format so you can't achieve superscript in CSV file.

fast 8 Jahre vor | 0

Beantwortet
Any documents for Autosar embedded coder with simulink
<https://www.mathworks.com/help/supportpkg/autosarstandard/index.html Embedded Coder Support Package for AUTOSAR Standard>

fast 8 Jahre vor | 0

Beantwortet
How to enable content preview for all subsystems programmatically?
Please refer to this example. f14; SubSystems=find_system('f14','FindAll','On','BlockType','SubSystem'); set(SubSyste...

fast 8 Jahre vor | 2

| akzeptiert

Beantwortet
S- Function cannot found
It sounds like the S-function .mexw64 file is created in later version (for example, R2015b) of MATLAB and is not compatible wit...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
function outputs as input control variant in simulink
It sounds like "variant subsystem" should not be used. Instead, "conditionally executed subsystem" should be used. In this case,...

fast 8 Jahre vor | 1

| akzeptiert

Beantwortet
How to change the parameter value of multiple (same) modules in Simulink?
Usually, write a script to do it in a batch, using the following functions. find_system() get_param() set_param()

fast 8 Jahre vor | 0

Beantwortet
How to select the indices of two arrays that satisfy two conditions using cellfun (no loops or ifs)?
IndA=contains(A,'(1)'); IndB=cellfun(@(x) sum(x)==1, isstrprop(B,'upper')); Index=find(and(IndA,IndB))

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
Loop to carry out calculation for pairs 1 and 2, then pairs 2 and 3 and so on.
You have 8 locations thus 7 distances. When j is 8, Final_Latitude_Values(j+1) exceeds the matrix dimension. Change the for-l...

fast 8 Jahre vor | 0

Mehr laden