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

plus de 7 ans il y a | 3

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

Réponse apportée
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...

presque 8 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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\" >...

presque 8 ans il y a | 0

Réponse apportée
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...

presque 8 ans il y a | 0

Réponse apportée
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...

presque 8 ans il y a | 4

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

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

presque 8 ans il y a | 0

| A accepté

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

presque 8 ans il y a | 0

Réponse apportée
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...

presque 8 ans il y a | 2

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

Réponse apportée
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.

presque 8 ans il y a | 0

Réponse apportée
Toolboxes unavailable in Matlab
Contact MathWorks' installation support.

presque 8 ans il y a | 0

Réponse apportée
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...

presque 8 ans il y a | 0

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

presque 8 ans il y a | 2

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

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

Réponse apportée
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...

presque 8 ans il y a | 1

Réponse apportée
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...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 8 ans il y a | 1

Réponse apportée
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 ...

presque 8 ans il y a | 0

Réponse apportée
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...

presque 8 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 2

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

presque 8 ans il y a | 0

Réponse apportée
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...

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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),'*'),:)

presque 8 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 8 ans il y a | 0

| A accepté

Charger plus