Answered
How do I stop figures from stealing focus without having to create a global variable?
Are you're sharing the handle to the graphics object that you're updating among the functions that update it? If so, ask that ob...

8 years ago | 0

Answered
Can MATLAB be purchased using a debit card?
Please contact Customer Service for help with this ordering issue. You can contact Service using the Contact Us link in the uppe...

8 years ago | 0

Answered
Your current working folder is: C:\Program Files\MATLAB\R2018b\bin Simulink does not permit you to modify the MATLAB installation area. Please change to a working folder that is not in the MATLAB installation area and re-try the previous command.
Change your current directory to something outside your MATLAB installation, ideally somewhere you have write permissions. As on...

8 years ago | 0

| accepted

Answered
create a vector using short hand notations
Since I suspect this may be a homework assignment or part of one I'll only give a hint: your vector elements aren't linearly spa...

8 years ago | 0

Answered
What Compilers Software works with MATLAB 2013B
See the entry in the Supported Compilers column and the R2013b row of the table on the Previous Releases system requirements pag...

8 years ago | 0

| accepted

Answered
Non-uniform axis spacing in a plot
About the only way you'll be able to get what you want is to lie a little bit. A = [0.5,0.65,0.7,0.66,0.81]; B = [5,10,20,100,...

8 years ago | 2

Answered
How to create a vector of handle functions?
Store your function handles in a cell array. f = {@(t) t, @(t) exp(t), @exp} % the second and third are equivalent valueOfSeco...

8 years ago | 0

| accepted

Answered
How to implement a setter restriction?
If you just want to accept 0, 1, true, and false try using the mustBeNumericOrLogical property validation function. See the "Con...

8 years ago | 1

| accepted

Answered
Is it possible to use logical indexing to specify between a number interval and include a value outside that interval.
You could use the isstrprop function to keep alphabetic letters and whitespace characters. str='This !is @tes#t'; letters = i...

8 years ago | 0

Answered
dir-command: import only files that have datenum between two dates
You don't need cellfun or serial date numbers. I'd use datetime instead. For instance, here's how to list the .m files in the di...

8 years ago | 1

| accepted

Answered
Error right-clicking on script/function name to open .m files
That suggests to me that you've overloaded something that is being called by the edit function. Do you happen to remember what f...

8 years ago | 1

Answered
Timedata 'dd-mmm-yyyy HH:MM:SS' transform into seconds
I would avoid going through datenum and datestr. Instead I would import that column of data as a datetime array (which I believe...

8 years ago | 0

Answered
use of 'fsolve' with passing symbolics in it ?
Use the solve function from Symbolic Math Toolbox or convert the symbolic expression into a function using matlabFunction and pa...

8 years ago | 0

Answered
How to draw horizontal line in my yaxis using my existing code
If you're using release R2018b or later use the yline function.

8 years ago | 0

Answered
How can I check 2 warningsID with testCase and check return values?
The matlab.unittest.TestCase.verifyWarning method does not have the functionality to check for two warnings being issued by the ...

8 years ago | 1

Answered
Replace elements of a matrix
Logical indexing is one approach. Two others are (if A contains only positive integer values) linear indexing: A = randi(4, 10,...

8 years ago | 0

Answered
Inquiry about the use of functions and vectors
The Static method attribute only applies to methods of classes, not to local functions inside a script or function file. If you ...

8 years ago | 0

Answered
How can i convert from table to time table
Your sampTime variable looks like it contains the times stored as text data, not as a datetime array. Create a variable (either ...

8 years ago | 1

| accepted

Answered
MATLAB R2018B documents the commands oobPermutedPredictorImportance and predictorImportance but these commands are not recognized by MATLAB, neither at the command nor in m-code.
From the documentation page for the oobPermutedPredictorImportance function: Mdl must be a RegressionBaggedEnsemble model objec...

8 years ago | 0

Answered
Sum variables from three in three, after summing compute an equation and organize all data into a new column?
x=data(:,1); i=1; j=1; for i=1:length(data) for j=1:3 x(i)=1; x(i+1)=2^2; x(i+2)=3^3; ...

8 years ago | 1

Answered
How to evaluate all the functions that I have in a directory automatically?
If all the MATLAB program files in the directory are functions that have the same signature (expecting the same number and type ...

8 years ago | 2

Answered
Parameterizing function's function with a vector
Use one of the techniques shown on this documentation page.

8 years ago | 1

Answered
Split the polynomial and determine the degree of numerator and denominator
From the fact that this question is tagged "control systems" and you're calling the zpk function in your code, it sounds like yo...

8 years ago | 1

Answered
how to compute possible route for travelling salesman problem
If you're trying to solve the traveling salesman problem through brute force that may take you a LONG time. Instead consider the...

8 years ago | 0

| accepted

Answered
Error using reshape - Please help!
The number of elements in the cell array raw is not necessarily the same as the number of elements contained in those cells. In ...

8 years ago | 0

Answered
How can I take a screenshot of a certain amount of code lines?
Consider writing your code in the Live Editor. Documents in the Live Editor can include both the code and the outputs from runni...

8 years ago | 0

Answered
Is there a function like string2double that can handle a numerical input?
First test if the input isnumeric. If it's not, try converting it from text data to a number.

8 years ago | 3

| accepted

Answered
Skipping elseif when first condition is true
If you want to execute the rest of the code regardless of whether a was equal to 0 or b was equal to 0, take it out of the if / ...

8 years ago | 0

Answered
Combine table variables and assign head-variable name
t1 = array2table(magic(3), 'VariableNames', {'Col1', 'Col2', 'Col3'}) t2 = array2table(eye(3)) t3 = table(t1, t2, 'VariableNam...

8 years ago | 3

Answered
Warning while overwriting a workspace variable?
While you can do this for certain types of variables (create a class and have that class's delete method issue a warning when ex...

8 years ago | 0

| accepted

Load more