Réponse apportée
How can I check whether an argument is given or not (inputParser)?
There's a _'UsingDefaults'_ property of the inputParser that is populated after it is parsed. This will tell you which variable...

plus de 9 ans il y a | 4

Réponse apportée
Matlab doesn't release memory when variables are cleared
You can force clear a variable from memory by setting it to empty rather than calling clear on it. x = []; v. clear...

plus de 9 ans il y a | 1

Réponse apportée
I have a knn classification model.i want to simulate the same in simulink
You could use the MATLAB function block to call your KNN model from Simulink.

plus de 9 ans il y a | 0

Réponse apportée
I need an elegant and fast way to get elements by single index in matrix
>> diag(A(1:numel(I),I)) Or >> A(sub2ind(size(A),(1:numel(I))',I))

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
how can i create a pdf report with both portrait and landscape orientation?
Try this: import mlreportgen.dom.* rpt = Document('output','docx'); append(rpt, Heading1('Hello')); cl...

plus de 9 ans il y a | 0

Réponse apportée
Parallel processing is not able to use all my cores.
You'll need MATLAB Distributed computing server in order to take advantage of all of the cores since they are controlled by sepa...

plus de 9 ans il y a | 0

Réponse apportée
Why is app designer not opening?
cd(prefdir) load('matlabprefs.mat') What are the settings in Preferences.appdesigner They should look something l...

plus de 9 ans il y a | 1

Réponse apportée
Merging two arrays's
cellfun(@horzcat,A,B,'UniformOutput',false) If you want to ensure uniqueness, wrap a unique around the horzcat cellfun...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
Match data by date
This is the _exact_ purpose to |timetable| in R2016b. You'll build two timetables, and <https://www.mathworks.com/help/releases...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
How to pass structure data into parfor loop
Use a cell array instead of a structure - they can be easily sliced by index. Or, less preferably, in newer releases turn the s...

plus de 9 ans il y a | 0

Réponse apportée
How to change the color of individual bars in a bar chart?
Why not just make a second bar? y = rand(1,3); hb = bar(y); hold on hbr = bar(2,y(2),'r');

plus de 9 ans il y a | 2

Réponse apportée
Improving performance of X = A \ B.
Rather than calling \, you can call |bicg| and |gmres| on sparse gpuArrays.

plus de 9 ans il y a | 0

Réponse apportée
What existing function can be used to divide two columns of a matrix by each other?
x./y ? In R2016b, this will implicitly expand to work on matrices with compatible sizes <http://blogs.mathworks.com/l...

presque 10 ans il y a | 0

Réponse apportée
Font settings in LIVE SCRIPT?
ctrl + + ctrl + - On a MAC it might be CMD.

presque 10 ans il y a | 0

| A accepté

Réponse apportée
More symbolic solver issues
>>syms x >>solve(((5*x + 13)*((25*x)/6 + 47/6) - 30)/((25*x)/6 + 47/6)>0,'IgnoreAnalyticConstraints',true) ans = (3...

presque 10 ans il y a | 1

Réponse apportée
add a new tab to the GUI
Not as of 16b. You can add things to your Quick Access Toolbar but that is it.

presque 10 ans il y a | 0

Réponse apportée
Insert image in AppDesigner GUI
This capability is in R2016b.

presque 10 ans il y a | 1

Réponse apportée
How to replace string but not function
This can be done elegantly and safely with Symbolic Math Toolbox syms x f n model(ix) expr = sinh(x).*f.*n subs(expr,n,mo...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
How to speed up manipulations of plot with a lot of data
Have you tried <https://www.mathworks.com/matlabcentral/fileexchange/40790 plot (big)>?

presque 10 ans il y a | 0

| A accepté

Réponse apportée
webread.m -- Too many input arguments
What you have for |webread| works fine for me in R2016b, Win7x64. My guess is you're shadowing one of the functions that webr...

presque 10 ans il y a | 0

Réponse apportée
How to reach older versions help pages?
On the right hand side of the documentation home page there's an "Other Releases" hyperlink: <http://www.mathworks.com/help/i...

presque 10 ans il y a | 2

| A accepté

Réponse apportée
Matlab language to C
Don't convert Rs to a char! Rs is a double here: Rs=x-(x^2-s)/(2*x); Here you convert it to a char. Rs='erre...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Can you load .mat files from c++ without owning Matlab?
You could have your colleagues use MATLAB Compiler SDK to build you a C++ shared library that could open the MAT files.

presque 10 ans il y a | 1

Réponse apportée
unsupported MATLAB function call for matlab function 'datastore'
If you're generating a mex file then flag it as |coder.extrinsic| and that piece will continue to run in MATLAB. Otherwise, rew...

presque 10 ans il y a | 0

Réponse apportée
Write a constraint for linprog that allows a solution to be either zero or non-zero with a minimum size?
Could you use |intlinprog| with a binary variable to determine 0 or nonzero and then the additional constraints on the minimum s...

presque 10 ans il y a | 0

A résolu


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

presque 10 ans il y a

A résolu


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

presque 10 ans il y a

A résolu


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

presque 10 ans il y a

Réponse apportée
How to use something similar as the VLOOKUP but in Matlab
[mv,idx] = min(Value) mintime = Time(idx)

presque 10 ans il y a | 1

| A accepté

Charger plus