Answered
Count number of column pairs occurrence in 3d array
A(:,:,1) = [5.5 2.2; 5.3 2.5; 5.3 2.1; 5.4 2.6]; A(:,:,2) = [5.2 2.9; 5.4 2.6; 5.4 2.6; 5.5 2.2]; [s1, s2, s3] = size(...

8 years ago | 0

| accepted

Answered
Matlab GUI seems to be lagging
Actually figure(FigH) should give the focus to the figure according to the documentation. But this did not work from Ma...

8 years ago | 1

| accepted

Answered
Error using an integral A and B must be floating point scalar
The error message is clear already: A and B must be floating point scalars. Your |A| (I assume this is |xmin|) is a vect...

8 years ago | 0

Answered
Is it possible for a formula to have a character array input?
A formula can have a char vector as input, but it is evaluated as char vector. For r = char('k(1)*C(1)*C(3)'); the value...

8 years ago | 0

Answered
Is it possible to plot on fullscreen with MATLAB?
If you work under Windows see: <https://www.mathworks.com/matlabcentral/fileexchange/31437-windowapi> . There is no built-in Mat...

8 years ago | 0

Answered
How can I calculate results from a function with two inputs using two arrays?
Something goes wrong. I need to test the function for all combinations of the arrays m=0:1:4 and n=0:1:3 (24 combinations)...

8 years ago | 0

Answered
Reuse the variable created in a loop in a function
You overwrite the 3D array in each iteration, Create the array to be filled *before* the loop: img_stack = zeros(num_row, n...

8 years ago | 1

Answered
Error with install opencv in matlab R2017a windows 10 64-bit
Did you try it again already? If it fails repeatedly, the message suggests to contact the technical support: Use the <https://ww...

8 years ago | 0

Answered
Difference between these 2 operations: D = M' * M then P' * D * P and P' * (M' * M) * P.
No, the assumption is not correct. The matrix in the parentheses is calculated and stored as a _temporary_ array. There is no wa...

8 years ago | 2

| accepted

Answered
How to form Adjacency matrix from CXX and CYY where CXX and CYY contains collectively some information??
As posted in <https://www.mathworks.com/matlabcentral/answers/384349-how-to-get-matrix-from-plot your other thread> already, the...

8 years ago | 0

| accepted

Answered
How to get matrix from plot ???
What about the methods explained here: <https://stackoverflow.com/questions/3277541/construct-adjacency-matrix-in-matlab>

9 years ago | 1

Answered
plotting 32 byte hex numbers
As far as I understand you want to compute 10^8 hash values with 192 bits, convert them to decimals, and draw them as pixels on ...

9 years ago | 2

Answered
plotting 32 byte hex numbers
It is still not clear what you want to plot. Do you want to convert the hex string to an integer value in the range [0 2^(8*32)-...

9 years ago | 1

Answered
How to make a for loop that sums all the odd values in the array?
Do you know the debugger already? <https://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html> You...

9 years ago | 0

Answered
ImgradientXY throwing errors when trying sameple code
Maybe the code is the same, but the inputs are not. I assume your |image2.jpg| is an RGB image, while |imgradientxy| expects a g...

9 years ago | 0

| accepted

Answered
\\thispc\scripts and c:\scripts not the same?
It is not clear, what went wrong, but this should work: addpath('C:\scritps', '-end'); savepath

9 years ago | 0

Answered
LP error the number of rows of A must be the same with b
The calling sequence is (see <https://www.mathworks.com/help/optim/ug/linprog.html doc linprog>) [x,fval] = linprog(f,A,b,A...

9 years ago | 1

Answered
Why didn't I get "Hello" word by running following script? if I change the value in if loop except 13.2 it gives me correct answer.
This is an evergreen question. Therefore it appears in the list of frequently asked questions: <https://www.mathworks.com/matlab...

9 years ago | 1

Answered
how can I compute memory usage?
It is not even uniquely defined what "used memory" is. If you read a file, the contents is cached in the RAM by the operating sy...

9 years ago | 2

Answered
MATLAB (2014a) crash while I use function polyfit() on macOS 10.13.3 High Sierra
This is strange. When did it work? What did you change since it worked the last time? Is the error reproducible? Did you use the...

9 years ago | 1

Answered
Matlab Exchange - More authors to one contribution
You can store the code on GitHub, where you can share an account, and create the submission in the FileExchange under just one p...

9 years ago | 2

Answered
Is there a way to code a GUI so that screenshots of it cannot be taken?
You can let the java.awt.Robot to take a screenshot, the operating system using the Print key, some programs for displaying imag...

9 years ago | 3

Answered
difficulty in printing for 'cell' inputs.
Maybe you want this: Str = fileread('edited_sentences_program3.txt'); Str(ismember(Str, char([10, 13]))) = []; % Remove...

9 years ago | 0

Answered
writePosition does not work within a GUIDE
Using globals to provide data is a bad, bad, bad idea. You cannot control reliably, if the variable was modified anywhere. Wh...

9 years ago | 0

Answered
How do I perform a particular set of statements for certain values?
In your code you care about x==b already, but for x==a there is no factor 2 also. You can run the loop over 2 to n-1 and add ...

9 years ago | 0

Answered
guidata(handles) does not save ALL handles in a Callback function in GUIDE
From where are these callbacks called? Is |handles| the current value of the handles struct or does it contain the value of the ...

9 years ago | 0

| accepted

Answered
Error using feval .
Error: File: funx.m Line: 2 Column: 8 y=x^4+2*x^3-x-1; The 8th column is the * . This is a valid Matlab operator and it is...

9 years ago | 0

| accepted

Answered
How can i make this code faster? I am new here and generally in programing
Optimizing code starts with finding the bottlenecks. It is not worth to optimize a part of the code, which takes 2% of the compu...

9 years ago | 0

| accepted

Answered
How to use two outputs from function in another functions calculation
I omit the unnecessary code (even the valuable comments - for clarity, leave them in the real code): function c = myScalPro...

9 years ago | 0

Answered
How to make an array with specific matrix values
I assume this works: A = [1 2 3 4 5 6 7 8 9 10; ... 2 2 3 3 4 4 3 3 2 2]; B = A(1, [true; diff(A(1, :)) ~= 0]); ...

9 years ago | 0

| accepted

Load more