Answered
Simulink 2017b Configuration Parameters Save Setup
That is not right. Your model must have some pre-load function or other callback functions that automatically change the setting...

8 years ago | 0

Answered
How to reverse a subarray of an array
A([1:min(idx)-1,max(idx):-1:min(idx),max(idx)+1:10])

8 years ago | 1

| accepted

Answered
Binary Bit Masking
>> dec2bin(7,8) ans = '00000111' >> bitget(7,1:8) ans = 1 1 1 0 0 ...

8 years ago | 0

Answered
How i can call matlab basic function if that name is accotiated with couple of functions?
I thought it is automatic as long as you specify your symbolic variable is properly specified. >> diff(1:3) ans = ...

8 years ago | 0

Answered
listing folders in directory with specific strings
dir() does not have the regexp option. I can think of this way a=dir; b=char({a([a.isdir]).name}); len=sum(isstrprop(...

8 years ago | 0

Answered
How do I make a random matrix with specific parameters of what numbers, how many of each, and what can be associated with other values?
This isn't completely random but it meets your other criteria and is something to start with. a=randperm(24); aa=repmat(...

8 years ago | 0

Answered
How to import flow rate wrt time data from workspace to simulink to use in variable flow rate?
"From Workspace" block, run the following to bring up the document web(fullfile(docroot, 'simulink/slref/fromworkspace.html')...

8 years ago | 0

Answered
how define in matlab like c++
even easier >> g=9.8 g = 9.8000

8 years ago | 0

Answered
How can I run a control loop faster than other on the simulation in Simulink?
This is pretty common. You just explicitly specify how different part of your model is executed. Run the following in MATLAB ...

8 years ago | 0

Answered
Getting output from Simulink using m-file (link for m-file in simulink)
Double click the annotation box to enter the "edit" mode, hover over the hyper link and right click, select "Hyperlink ..." and ...

8 years ago | 1

| accepted

Answered
Run exe with an input file and close upon process exit
Try to run system() manually first or open a command window and then type in line by line cfd.exe <exp.in exit

8 years ago | 0

Answered
Hello, I am new to Matlab and want help to count number of rows in a matrix that belong to data subset.
a=[4 7 6 8 NaN NaN 0.2 0.5 0.3 0.9 0.1 0.7 0.6 0.4 -999 -999 1.6 1.9 2.8 6.4 5.1 8.3 2.3 4.7]...

8 years ago | 1

Answered
How can I refer to a variable, defined in one .m file, within a function defined in another?
Define it as an input argument and pass the value in function [R,M,T,SOI] = KSP_bod(bodies) call using the syntax [R,...

8 years ago | 1

| accepted

Answered
extract numbers from time series
a=1:156; b=reshape(a,6,[]); c=b(:,1:2:end)

8 years ago | 0

Answered
how to store cells values of multiple images into a single file ?.
cell2mat() reshape()

8 years ago | 0

Answered
Loop is not reading from the first value in the array?
It is because third column in B has duplicated values. For example, the result of the first loop (b=1) in the "for b = 1:length(...

8 years ago | 0

| accepted

Answered
In the "model data - > Inports/Outports" panel in simulink, there is a "Source" column, how do I access this through the API.
I think that "Source" column just shows the Inport block name. Change the Inport block name in the model to see if it changes.

8 years ago | 0

Answered
Keep certain rows and deleting certain rows in excel using matlab coding
Assume your Excel file contains one column of numeric data, a=xlsread('MyExcel.xlsx'); a=a(1:10:length(a));

8 years ago | 0

Answered
I want to generate all possible combinations of 3*3 matrix, where the sum of all elements of this matrix equal 10.
Then you probably mean "one way" to generate the matrix, not "all possible combinations". The one way below does not even consid...

8 years ago | 0

Answered
Which licence source has priority in the MLM_License_File?
I would say the preference would be individual license first and then network license. But anyway, you can set up the priori...

8 years ago | 0

| accepted

Answered
reshape matrix without loop
a=[ 1 1 5 1 2 6 1 3 7 2 1 8 2 2 9]; MatrixSiz...

8 years ago | 2

Answered
Can you look at different data files within a Simulink model?
Use a "Variant Subsystem" block. https://www.mathworks.com/help/simulink/slref/variantsubsystem.html?s_tid=doc_ta

8 years ago | 0

Answered
Could anyone explain to me the method used by the ode23s function?
<https://blogs.mathworks.com/cleve/2014/05/26/ordinary-differential-equation-solvers-ode23-and-ode45/ ordinary-differential-equa...

8 years ago | 0

| accepted

Answered
cd command not working
cd(test) cd('/Users/myusername/Documents/MATLAB') cd /Users/myusername/Documents/MATLAB

8 years ago | 0

| accepted

Answered
When I type in my inputs in the function 'to' ,'subject', 'body' to send an email and hit run I'm not sure why I get an error message and it fails to send.
when you define a function, you write "function email(a,b,c)" with input argument variables. when you call and run the functi...

8 years ago | 0

| accepted

Answered
get directory from edittext and use it in cd
I would suggest you use uigetdir(). Just run a=uigetdir and get a sense of it. You can pass the returned string a to the Editbox...

8 years ago | 0

Answered
How to randomly generate a row with restrictions?
b=repmat([1 0 0],1,41); B=zeros(1,204); B(sort(randperm(204,123)))=b

8 years ago | 1

Answered
About maximum value in matrix
use abs() and note that the second return of max() gives the indices. See if you can figure it out.

8 years ago | 0

Answered
How to remove similar element in cell?
setdiff(), going through a loop results=z; for k=2:length(z) results{k}=setdiff(z{k},z{k-1}); end celldisp(...

8 years ago | 0

| accepted

Load more