Respondida
How to unit test with verifyError?
verifyError(testCase, @()add5('c'), 'add5:InputMustBeNumeric') Pass the function handle into verifyError rather than a res...

más de 7 años hace | 3

| aceptada

Respondida
I'm trying to subtract the day from the datetime
dateshift(dt, 'start', 'month') There will still be a day associated with it but it would be standardized on first day of m...

más de 7 años hace | 0

| aceptada

Respondida
How get row index of first and last appearance each unique cell element
Unique is your friend: x = ["MUY09KT00" "TW00.00" "MUY09KT00" "TW00.00" "MUY09KT00" "TW00.00" "MHJ09KT00" "P...

casi 8 años hace | 0

Respondida
S Function Builder - To implement existing C code
If you're using 18b, consider using the C Caller block: <https://www.mathworks.com/help/releases/R2018b/simulink/ug/integrate...

casi 8 años hace | 1

| aceptada

Respondida
Parsing varargin for a function called with values only instead of name-value pairs
I like name-value pairs because it makes it easier to extend in the future if you need a new option. With the ability to have a...

casi 8 años hace | 0

| aceptada

Respondida
regexp find next char
Use string arrays! >> a = string('A = p:\A to B\Mat Lab\Ques Tion\') a = "A = p:\A to B\Mat Lab\Ques Tion\" >...

casi 8 años hace | 0

Respondida
Cumulative sum with conditions
h = [1 0 0; 1 1 0; 0 0 1; 1 1 1; 0 1 0]; s = sum(h, 2).*~h(:,end) requiring the last element to be...

casi 8 años hace | 0

Respondida
Matlab Histogram: connecting bin centers to make a curve
I recommend using the newer histogram rather than hist. x = randn(100,1); h = histogram(x); hold on plot(conv(h.BinEdges...

casi 8 años hace | 4

| aceptada

Respondida
Longest Sequence of 1s
<https://www.mathworks.com/help/releases/R2018b/images/ref/bwareafilt.html> biggest = bwareafilt(x, 1) If x is a char ar...

casi 8 años hace | 0

Respondida
dtw example from MatLab Documentation doesn't not work
The second occurrence is the one you want. Rename the first file to something else.

casi 8 años hace | 0

| aceptada

Respondida
Unzipping a uint8 array
Use websave instead: tempzipname = [tempname '.zip'] websave(tempzipname, url); deleter = onCleanup(@()delete(tempzipname...

casi 8 años hace | 0

Respondida
How to batch convert table columns to categorical
In 18b there is a convenience function to do exactly this: <https://www.mathworks.com/help/releases/R2018b/matlab/ref/conve...

casi 8 años hace | 2

| aceptada

Respondida
Matlab doesn't import standard python modules, when importing a custom python module
Please also note that the ability to use resnet and train/transfer deep networks is available in MATLAB in the <https://www.math...

casi 8 años hace | 0

Respondida
How can I create paths relative to a specific folder to facilitate moving project folders to other locations?
|mfilename('fullpath')|, |fullfile|, |fileparts|, |pwd| are my best friends for this type of work.

casi 8 años hace | 0

Respondida
Toolboxes unavailable in Matlab
Contact MathWorks' installation support.

casi 8 años hace | 0

Respondida
get classifier name function
|getclassifiername| is defined as a local function in the function you linked to. I.e. it can only be called from within that f...

casi 8 años hace | 0

Respondida
Matlab on an Acer Chromebook?
Have you considered using MATLAB Online? That wouldn't require an installation and would probably offer more horsepower.

casi 8 años hace | 2

Respondida
What's the easiest way to call two independent scripts and have them run in parallel?
Either use |batch()| or |parfeval()|

casi 8 años hace | 0

| aceptada

Respondida
dbstop within a condition
I think keyboard() does exactly what you want. It just stops at that line in debug mode. But to find the number, I'd conside...

casi 8 años hace | 0

| aceptada

Respondida
Can NOT access properties when creating a new class by inheriting the gpib class
Looking through the metaclass stack for gpib ( >>?gpib or >>metaclass(gpibobj) and looking at the metaclasses' superclasses) it...

casi 8 años hace | 0

Respondida
How to execute timer functions in MATLAB GUI in parallel?
Use |parfeval| in the parallel computing toolbox to asynchronously run the computationally expensive algorithmic (not gui update...

casi 8 años hace | 1

Respondida
What are DEMs good for and what are they not good for?
I would probably use aerial imagery and image processing/computer vision/deep learning to identify the roofs. Most DEMs don't t...

casi 8 años hace | 0

| aceptada

Respondida
Feature request: HEVC video support
You may want to consider filing a tech support enhancement request. This is an open community that does not feed directly into ...

casi 8 años hace | 1

Respondida
How to configure Editor when working on class methods so that I can jump to implementation?
I usually work in debug mode, either from calling something at the command line or by running a unit test. You're working on ...

casi 8 años hace | 0

Respondida
How to get Compiler SDK to find matlab.codetools.requiredFilesAndProducts when compiling C++ shared libraries?
I don't see it explicitly mentioned here but depfun was: <https://www.mathworks.com/help/compiler/unsupported-functions.html...

casi 8 años hace | 1

| aceptada

Respondida
Regular Expression pattern for matching a variable name after an operator (mathematical or logical) ?
You may wish to consider using the shift+enter option in the MATLAB editor. Find where variableA is defined for the first tim...

casi 8 años hace | 2

Respondida
Can any one help me to set an adaptive threshold using matlab code?
Perhaps look at |ischange| or |islocalmax/findpeaks|.

casi 8 años hace | 0

Respondida
Compiled Matlab Application calls file
Look at: mfilename, fullfile, fileparts, pwd, uigetfile These functions allow you to build full or relative paths that are ge...

casi 8 años hace | 0

| aceptada

Respondida
How to delete an entire row in a cell array based on the occurrence of a character in one column?
c2 = c(~contains(c(:,1),'*'),:)

casi 8 años hace | 0

| aceptada

Respondida
App - changing button state when a uifigure is closed
A perfect case for events and listeners. Add a listener for the _ObjectBeingDestroyedEvent_ of the new uifigure. app.Scrip...

casi 8 años hace | 0

| aceptada

Cargar más