Question


How to change property behavior for a mocked object
I'm trying to use the mocking framework for unit tests I'm trying to make the property of a mock object return another mock obj...

environ 5 ans il y a | 1 réponse | 1

1

réponse

Réponse apportée
Rearrange any matrix Randomly with a specific sequence
A=1:20; blockSize = 5; nOutputBlocks = 2; a=reshape(A,blockSize,[]); i=sort(reshape(randperm(size(a,2)),[],nOutput...

environ 5 ans il y a | 0

Réponse apportée
How to transfer data between apps using app designer
The simplest solution would be to couple the two apps. When you open app B send the object of app A to it. Then when app B upd...

environ 5 ans il y a | 2

Réponse apportée
Moving NaN elements from the last columns to the first column, iteratively
The simplest way would be to loop through the rows: i = isnan(A); for j = 1:size(A,1) A(j,:) = [A(j,i(j,:)) A(j,~i...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Replace the elements of a matrix
B = reshape(A',numel(A),1)

environ 5 ans il y a | 0

Réponse apportée
Save char array from for loop into a matrix
Unless you can guarantee that all file names have the exact same length, you need to use something other than a char matrix. E...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Could anyone help me how to randomly display the values in the selected places
if you meant to fetch values from a random index using above mentioned linear indices: a = magic(5); a = a(1:3,:); validInd...

environ 5 ans il y a | 0

Réponse apportée
How to convert a cell array containing various inline functions to a unique inline function?
You can generate a function handle which will execute all the handles in a cell array using closures: a = magic(3); myFunction...

environ 5 ans il y a | 0

Réponse apportée
[DEPRECATED] What frustrates you about MATLAB?
The implementation of properties. They are class fields, and they are the accessor methods to these fields, (get/set). This dual...

environ 5 ans il y a | 0

Réponse apportée
Could anyone help me to solve the following issue
a = [1 2 3 4 5; 6 7 8 9 10] a_rand = a(randperm(length(a))) a_rand = [a_rand; a(~ismember(a(:),a_rand(:)))']

environ 5 ans il y a | 0

Réponse apportée
can matlab find ilaplace
Try that: syms s; F = exp(-y*sqrt(s+a))/s; F1 = ilaplace(F); pretty(F1); I don't know what a and y are in your ...

environ 5 ans il y a | 0

Réponse apportée
Select all Rows that Contain A Certain Number and Any NaN's That follow Them
I think in this case a simple loop will be better than a fancy vectorised solution. valid = false(size(A, 1),1); vali...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How to clear persistent variables?
You can clear the name of the .m file in which that function is declared it works for .m file functions, local functions, neste...

environ 5 ans il y a | 2

Réponse apportée
Extract Previous Cell Value
The problem is you're indexing at index 0 which is invalid. % some specific handling of % the first cell should be % ...

plus de 5 ans il y a | 0

Réponse apportée
regexrep for the neophyte
match = regexp(recipients,'(?<name>[a-zA-Z]+(?:\s*[a-zA-Z]+)*)\s?\$?(?<sum>\d+(?:[\.,]\d+)*)[^\w,;]*(?<time>[a-zA-Z]+\d+)?','n...

plus de 5 ans il y a | 1

| A accepté

Question


multiple populations in a single pole
I have histograms that most likely represent multiple populations. If they distribute normally I know I can use curve fitting...

plus de 5 ans il y a | 1 réponse | 0

0

réponse

Réponse apportée
what's the matter when i run a M.file?
textscan accepts a file id not a file path. Use <https://www.mathworks.com/help/matlab/ref/fopen.html fopen> first

plus de 5 ans il y a | 0

Réponse apportée
Please Help Me Simple Question
This is a simple linear equation: price = 10 + 4*floor(depth);

plus de 5 ans il y a | 0

Réponse apportée
Error in App Designer with Slider: 'Index Exceeds Array Bounds'
without the full code it's hard to say, and in general uploading screenshots of your code is not very helpful. Still, the probl...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Why I am getting error message when I try to define line specs of a plot?
You are using an overload of plot that accepts a cfit object https://www.mathworks.com/help/curvefit/cfit.plot.html this overl...

plus de 5 ans il y a | 0

Réponse apportée
Matlab says to many Inputs calling a fucntion in app designer, even if the input is just one value.
The first argument in a method (that's what functions are called in object oriented programming) of an object is the object inst...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Sliding window for polynomial fitting of a function
What you describe is a stavisky golay filter if I understand correctly windowSize = 10; polyOrder = 20; poly_fit = s...

plus de 5 ans il y a | 0

Réponse apportée
Newbie: Order of line and plot in a simple figure
This is actually not a newbie issue... As far as I know, it's a known issue with yyaxis. A workaround by @Charles Brown using ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
If i ask a question and happen to be the only one who answered it, please don't nudge me to accept the answer

plus de 5 ans il y a | 0

Réponse apportée
Quick question about GUI and calling functions.
I'm guessing you mean this file exchange <https://www.mathworks.com/matlabcentral/fileexchange/44820-matlab-code-for-ask-modul...

plus de 5 ans il y a | 0

Réponse apportée
[Warning] Why is it bad practice to set additional class properties when using a set method (prompting a warning)?
The thing is that dependent properties always invoked their get/set methods every time you access them. what you did doesn't ne...

plus de 5 ans il y a | 0

Réponse apportée
How to generate normalised random numbers in between -0.3 to 0.3?
noise = rand(1,10)*0.6 - 0.3 noise = 0.0973 0.0479 0.2486 0.1055 -0.1262 -0.0478 0.0915 -0.1104 0...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to access itemprop = "name" from within a data structure in HTML code using Matlab?
I don't have the toolbox you mentioned, but it most likely uses xpath to parse the html... I think the best options are xpath o...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
For loop in if/elseif statements which compares multiple characters
The simplest way to simulate N dart throws is to use a for loop from 1 to n and simulate each throw inside the loop: N = randi(...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to write a matrix using for loop
I would start at the documentation

plus de 5 ans il y a | 0

Charger plus