Answered
How to find the smoothness of these results?
Acceleration = rand(1, 1000); % Test data Jerk = gradient(Acceleration); This replies the two sided quotient of diffe...

13 dagen ago | 0

Answered
Format a SD card using MATLAB
There are smarter ways to format an SD-card, see https://www.easeus.com/partition-manager-software/format-sd-card-using-windows-...

13 dagen ago | 1

| accepted

Answered
read inconsistent ascii file to matrix
Data = fileread(FileName); C = strsplit(Data, char(10)); % [EDITED] Remove comments: C(strncmp(C, '%', 1)) = []; match ...

13 dagen ago | 0

| accepted

Answered
how to find distance of each pixel of image from center of image
If your image has 640 x 480 pixels, and the center is at the pixel 320 / 240: img = rand(480, 640); y = 1:size(img, 1); x = 1...

14 dagen ago | 0

| accepted

Question


Interpolation method of IMAGE
When the size of the data displayed by the image command differs from the number of pixels used on the screen, the data must be ...

17 dagen ago | 0 answers | 0

0

answers

Answered
Get values from callback function
Use uiwait and uiresume to wait for the pressing of the button: ... % Create check boxes: cbx1 = uicheckbox(fig,'Text','Defi...

18 dagen ago | 0

| accepted

Answered
How do I stop this xlswrite error message?
It is not enough to think, that the license is active. Start Excel and check the license: http://kb.mit.edu/confluence/pages/vi...

18 dagen ago | 0

Answered
how to match sub string with main string in a cell array??
With modern Matlab versions >= R2016b: a = {'hard';'smart';'hard drive';'smart work';'hark disk';'hard drive'}; b = {0.1;0.2;0...

18 dagen ago | 0

| accepted

Answered
Polyfit error warning for SDE
tau and GErr are scalars, so you have one single point for the polynomial only. Then you cannot determine a slope. I guess you ...

18 dagen ago | 1

| accepted

Answered
Unable to access property editor
See https://www.mathworks.com/matlabcentral/answers/453228-documentation-doesn-t-open-in-new-window-anymore , especially Adam's ...

19 dagen ago | 0

Answered
How can i drag and drop ?
Matlab does not have the feature for using drag&drop by mouse. But the copyobj command let you copy the contents of one axes int...

19 dagen ago | 0

Answered
Is there a way to combine number of matrices into one?
If you have 1000 arrays, it would be a really bad idea to store them in different variables, e.g. by hinding an index in the nam...

19 dagen ago | 1

| accepted

Answered
How to exclude zeros in a matrix?
The cell is the right approach: for i = 1:8 Vyy{i} = nonzeros(data_dic_save.displacements(i).plot_v_ref_formatted); ...

19 dagen ago | 2

| accepted

Answered
Finding average of every nth row?
This is the mean over 6 subsequent rows: x = rand(9985, 1); S = numel(x); xx = reshape(x(1:S - mod(S, 6)), 6, []); y = su...

19 dagen ago | 2

| accepted

Answered
HELP! Bisection method fails to found zero
Simply use the debugger to test, what's going on: https://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-feat...

19 dagen ago | 1

| accepted

Answered
Alternative to for loop i.e. recursion
Inlined dec2bin(0:2^p-1): M = rem(floor((0:2^p-1).' .* 2 .^ (1-p:0)), 2) Another solution: M = zeros(2^p, p, 'uint8'); n1 =...

19 dagen ago | 3

Answered
imagesc - size of figure changes content
It does not just look like there is an interpolation, when you resize the image, but of course there is in fact an interpolation...

19 dagen ago | 0

Answered
How to add thumbnail to a .fig file in Windows 10?
The approach to use the thumbnail of the image in the Windows Explorer is rather indirect. This is not the purpose of the Window...

20 dagen ago | 0

| accepted

Answered
Could you please correct my program for single variable but different size and many outputs.
A{1} = '9/027B/029B/02C1/0245/0335/01A8/0365/0110/0335/00D5/0323/00B3/034E/0038/0359/-FFC3/032' A{2} = '023C/031C/0286/02CA/02A...

20 dagen ago | 0

Answered
What is the difference between Micro and Macro?
This is the perfect question for your teacher. Remember that we cannot read his or her mind and that she or he is payed for givi...

20 dagen ago | 0

Answered
How to make a smooth image using the "patch" function ? (and not crenellated)
If you want to export the image as vector graphics, use the 'Painters' renderer. For 3D graphics with transparencies the OpenGL ...

20 dagen ago | 0

| accepted

Answered
why a is function call from within a function much much slower than not doing it in a function.
This is not a problem, but it shows that Matlab's JIT acceleration works powerful. With the inlined code it seems to recognize, ...

20 dagen ago | 0

| accepted

Answered
mex file only found when in working directory, but not when in search path
The message "The specified module could not be found" means, that the mex function cannot find a required library, most likely...

21 dagen ago | 2

Answered
heun mthod 1st order ode
"Using intervals of delta t=1" does not mean h = 0.1; t = 0:h:100; but h=1. Then the 2nd question is easy: [value, index] =...

21 dagen ago | 2

| accepted

Answered
Ignoring when indexing value positions are invalid
"when o = 24, it will only take the 24 first indces into account" for k = 1:length(mBall) if mBall(k, 4:5) == 0 ...

22 dagen ago | 0

Answered
how to have a variable axis in matlab
Do not change only the XTicks, but adjust the X-values also: x = [1, 2, 3, 4, 5, 5.1, 5.2, 5.3, 5.4, 5.5] y = rand(size(x)); ...

22 dagen ago | 0

Answered
memory leaks (simple coding to complex ones)
"The code is clean" - no, it is not clean. You are using the evil eval, which is a desaster for efficient code. Creating variabl...

23 dagen ago | 0

Answered
Speeding up IF and comparisons whithin a loop
Do not take the output of the profiler too literally. If this is the first access to the value of X, it might be the time for co...

23 dagen ago | 0

| accepted

Answered
how can i solve this ,can anyone provide me with code? whats wrong with my code ?
function valid = valid_date(year, month, day) % scalar positive integer limit if isscalar(year...

23 dagen ago | 1

Answered
Circshift matrix by different amount without for loop
Try: n = 8192; spectrums = rand(512, n, 22); shifts = randi(n, 1, 22); tic s1 = cell2mat(arrayfun(@(k) ... ...

24 dagen ago | 2

Load more