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

mehr als 9 Jahre vor | 4

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

mehr als 9 Jahre vor | 1

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 1

| akzeptiert

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 1

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 2

Beantwortet
Improving performance of X = A \ B.
Rather than calling \, you can call |bicg| and |gmres| on sparse gpuArrays.

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

Beantwortet
Font settings in LIVE SCRIPT?
ctrl + + ctrl + - On a MAC it might be CMD.

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 1

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

mehr als 9 Jahre vor | 0

Beantwortet
Insert image in AppDesigner GUI
This capability is in R2016b.

mehr als 9 Jahre vor | 1

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 2

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 1

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

fast 10 Jahre vor | 0

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

fast 10 Jahre vor | 0

Gelöst


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.

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Beantwortet
How to use something similar as the VLOOKUP but in Matlab
[mv,idx] = min(Value) mintime = Time(idx)

fast 10 Jahre vor | 1

| akzeptiert

Mehr laden