Réponse apportée
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,:)

presque 8 ans il y a | 2

| A accepté

Réponse apportée
Why is exist(variable,'var') not seeing a variable?
exist('signedOrNot','var')

presque 8 ans il y a | 3

| A accepté

Réponse apportée
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,...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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')

presque 8 ans il y a | 0

| A accepté

Réponse apportée
How to combine structures with the same name fields?
Did you try New=[xswn; xsw_]

presque 8 ans il y a | 0

| A accepté

Réponse apportée
How to change storage class
use get() and set(), instead of get_param() and set_param()

presque 8 ans il y a | 0

Réponse apportée
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 ...

presque 8 ans il y a | 0

Réponse apportée
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...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

| A accepté

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

presque 8 ans il y a | 0

| A accepté

Réponse apportée
S-function does not exist error!
run "mex -setup" to select VC2017 as the compiler and then run mex.

presque 8 ans il y a | 0

Réponse apportée
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.

presque 8 ans il y a | 2

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
Select xlim max-value
max() is a function. Don't use it as a variable name. xmax=max(xlim)

presque 8 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

Réponse apportée
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')

presque 8 ans il y a | 0

Réponse apportée
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...

presque 8 ans il y a | 0

Réponse apportée
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

presque 8 ans il y a | 1

| A accepté

Réponse apportée
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')

presque 8 ans il y a | 0

Réponse apportée
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...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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.

presque 8 ans il y a | 0

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

presque 8 ans il y a | 0

Réponse apportée
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...

presque 8 ans il y a | 2

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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,...

presque 8 ans il y a | 1

| A accepté

Réponse apportée
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()

presque 8 ans il y a | 0

Réponse apportée
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))

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

Réponse apportée
Issue in executing command containing single quote using Plink
I would suggest putting all the commands in a M-script and then run "fullpath\bin\matlab.exe" -r "MyScript" Notice the dou...

presque 8 ans il y a | 0

Charger plus