Answered
How do I overwrite text in the command window?
or go fancy, waitbar()

9 years ago | 1

Answered
Try/Catch Evalc and display output if error
Try this: function my_code() try T = evalc('blackbox()'); catch ME display(ME.message); end ...

9 years ago | 0

Answered
simout from simulink produce more data then give.
The data in simout is determined by the number of simulations that have been ran. You input data might have been from 1 to 10, i...

9 years ago | 1

| accepted

Answered
how to add "large arrays" (64 bits) to codegen generated function?
I would assume that, if you specify the data type of your index variable as uint64, it will generate the code correctly using 64...

9 years ago | 0

Answered
Is there a function that shows the value of the points on a plot as your mouse runs over them?
What about the build-in "Data Cursor"? Make a plot, go to "Tools", turn on "Data Cursor". Or, click the "Data Cursor" icon on th...

9 years ago | 0

| accepted

Answered
Error: Values of BreakpointsForDimension1 in 'Lookup_table' must be monotonically increasing.
The 1-D lookup table block has a parameter called "Breakpoints 1". It is a vector. The value needs to be incremental, for exampl...

9 years ago | 3

| accepted

Answered
How to find number of different types of blocks?
Try this. Note that in your case, "And" and "Or" block are actually the same block type. It is called logical operator block. ...

9 years ago | 0

| accepted

Answered
How to save table filled with strings to .txt?
help writetable

9 years ago | 1

| accepted

Answered
Find an vector in a cell array
A{1}= [1 2 3; 4 5 6; 7 8 9]; A{2}= [11 2 3; 4 5 6]; A{3}= [1 12 3]; IsInA=any(cellfun(@(x) ismember([1 2 3], x,'r...

9 years ago | 0

| accepted

Answered
compare cell arrays for equality
glf={'070617', '091216','280217'}; grmmf={'070617', '280217', '070617','280217'}; [LIA,LOCB]=ismember(glf,grmmf)

9 years ago | 1

Answered
I have two columns of excel data which I want to be imported using xlsread based on certain criteria, but I can only get one column to be selected.
b = rawMN(cellfun(@(x) ~isempty(x) && isnumeric(x) && x>= day1 && x <= day2, rawMN),:);

9 years ago | 1

| accepted

Answered
How do you write to excel a cell array that contains both strings and numbers?
As long as each cell is a single scalar or a single string, what is wrong with using xlswrite() directly? TestData={'a',1;2...

9 years ago | 0

Answered
Customize name of code generated called M-FIles
Right click the block, select "Block Parameters (Subsystem)", select the "Code Generation" panel, For "Function packaging", sele...

9 years ago | 0

Answered
I have matlab 2013b and all of a sudden the following code for median with omitnan does not work. Can anyone help troubleshoot?
You must be mistaken about the MATLAB version. The "nanflag" option for the median() function is only available for R2015a and l...

9 years ago | 0

Answered
Algebraic Loop Problem - Avoiding Algebraic Analysis
If the contents inside the two subsystem blocks are all simple arithmetic math, then most likely the model does have algebraic l...

9 years ago | 1

Answered
Simulink finds deleted or renamed library file
Yes. The library model is most likely open but hidden. You could run either of these two commands to force closing it. b...

9 years ago | 0

| accepted

Answered
Need Matrix operation HELP
sum(T,2)

9 years ago | 0

Answered
How can i make infinity sinal using "signal builder"?
I had this problem too. It seemed that you can't specify a customized repeating sequence using Signal Builder Block. If there...

9 years ago | 1

| accepted

Answered
Newbie question about example on a textbook
You probably saved your file as subplot.m It conflicts with the subplot() function and built-in subplot.m Name it somethin...

9 years ago | 0

| accepted

Answered
How to save specific variable names
Vars=who('*_T22P50'); save('MatFile',Vars{:});

9 years ago | 0

Answered
Index exceeds matrix dimensions even though it shouldn't.
Let me guess, length(X) returns the length of vector X. It is equivalent to MAX(SIZE(X)) for non-empty arrays and ...

9 years ago | 0

Answered
Matrix manipulation by function
C=A; C(B,:)=[]; C(:,B)=[]

9 years ago | 0

Answered
Produce a matrix with the class of its elements
class(1) returns the string 'double'. So you need to use B{ii,jj} = class(A(ii,jj))

9 years ago | 1

Answered
Convert decimal to hex in a table
Would this suffice? >> dec2hex([13 232 4 43]) ans = 0D E8 04 2B

9 years ago | 0

| accepted

Answered
How can I overlay three simulation results each with different time series in a same result.
plot(2:5,rand(1,4)); hold on; plot(1:10,rand(1,10));

9 years ago | 0

Answered
Simulink For Each Subsystem Block Issues
See screen capture and the attached model. <</matlabcentral/answers/uploaded_files/67908/Capture.JPG>>

9 years ago | 0

| accepted

Answered
Fail to plot graphs in a for loop, hold on doesn't work
Put the "hold on" command after the figure() line. "hold" holds the current plot. "figure(H)" makes H the current figure. ...

9 years ago | 0

| accepted

Answered
What command could run any file.m chosen
help run FileName='c:\mydoc\test.m'; run(FileName);

9 years ago | 0

Load more