Beantwortet
How can I fix my code so that it evaluates matrices of all sizes?
please note, length(B) is equal to max(size(B))

etwa 9 Jahre vor | 0

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

etwa 9 Jahre vor | 1

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

etwa 9 Jahre vor | 0

Beantwortet
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...

etwa 9 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 9 Jahre vor | 0

Beantwortet
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...

etwa 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 9 Jahre vor | 3

| akzeptiert

Beantwortet
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. ...

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 1

Beantwortet
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),:);

etwa 9 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 9 Jahre vor | 0

Beantwortet
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...

etwa 9 Jahre vor | 0

Beantwortet
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...

mehr als 9 Jahre vor | 0

Beantwortet
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...

mehr als 9 Jahre vor | 1

Beantwortet
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...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Need Matrix operation HELP
sum(T,2)

mehr als 9 Jahre vor | 0

Beantwortet
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...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

Beantwortet
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 ...

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

Beantwortet
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))

mehr als 9 Jahre vor | 1

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

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
How to remove from a matrix only those columns whose all elements are either NaN or zeros?
A(:,all(isnan(A)))=[]

mehr als 9 Jahre vor | 0

Beantwortet
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));

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
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. ...

mehr als 9 Jahre vor | 0

| akzeptiert

Mehr laden