Answered
Code to change matlab window size?
See <https://www.mathworks.com/matlabcentral/fileexchange/32005-cmdwintool>: CmdWinTool('Position', [1, 100, 800, 800]); ...

9 years ago | 1

Answered
How can I plot the sine wave with amplitude of 7 over the interval 0≤x≤2pi? The graph does not look correct in my opinion, but it is the first time I use Matlab, so maybe it is good. .
Instead of the statement "does not look correct" you can explain, what you are seeing. |y=7*sin(2*pi)| creates a scalar. If y...

9 years ago | 0

Answered
finding min max in matrix with loops and condintion only
You have an exam next week and still do not know how to write a |for| loop in Matlab and how to use the documentation to find ou...

9 years ago | 0

Answered
Vector of min or max for 3 vectors
Start with creating a matrix: M = [A, B, C] Then the |min| and |max| commands create the output directly.

9 years ago | 1

| accepted

Answered
My error is the ever popular ''Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in Doc (line 7) fprintf(fid,'\t Question for CPA \n');'' What is wrong??
Obviously the opening of the file was not successful: [fid, msg] = fopen('prac.docx','w'); if fid == -1 error('Cann...

9 years ago | 0

| accepted

Answered
how can i use input data in if..elseif?
I assume you do not want to compare the loop index |i| but the data: grade = cell(1, N); for i = 1:N if final(i) >=...

9 years ago | 0

Answered
how to renew matlab license?
The next question, which concerns a license, which expires on the 11-Nov-2017. See <https://www.mathworks.com/matlabcentral/answ...

9 years ago | 1

Answered
Wait for a key press or move on with next trial
What is |endtime, StimTime, starttime|? You have posted a lot of code, which is not related to the actual question, but not the ...

9 years ago | 0

Answered
After division i am getting 1 as the answer
What is your question? Does the result differ from your expectation? Then explain, what you expect instead, because the readers ...

9 years ago | 1

Answered
How to get the smallest difference(Array)
The question does not contain the detail, that the input is a matrix, but a scalar and a vector only. Then: [c, index] = mi...

9 years ago | 1

Answered
Cannot identify error in line of code
You reset |sumCn4| in each iteration to 0 and add |Cn4|. In consequence the result will contain the last element only - if the c...

9 years ago | 0

| accepted

Answered
Not sure how to approach this
You need a function to implement this. Do you know how to write a function? If so, the calculations are split into 3 parts: T...

9 years ago | 0

Answered
Fast data structure for tabu list?
It is much faster to store the hash keys in an UINT64 matrix than in a cell string: tic; nKey = 4e4; List = zeros(2...

9 years ago | 0

Answered
Fast data structure for tabu list?
You can use a hash, e.g. obtained by <https://www.mathworks.com/matlabcentral/fileexchange/31272-datahash FEX: DataHash> or <htt...

9 years ago | 0

Answered
Print numbers on an array that have a unique row and column
Perhaps you want: index = randperm(8, 8); X = zeros(8, 8); for k = 1:8 X(k, index(k)) = 1; end ...

9 years ago | 1

| accepted

Answered
### Failed to generate all binary outputs.
I'd start with checking the existence of all folders, which appear in the message: C = {'C:/ProgramData/MATLAB/SupportPacka...

9 years ago | 0

Answered
How To... Plot Multiple Data Sets on the Same plot
Or: plot(1:10, rand(1, 10), 'r-+'); hold('on'); plot(1:10, rand(1, 10), 'g-d'); plot(1:10, rand(1, 10), 'b-*'); ...

9 years ago | 0

Answered
Automatically Refresh a plot in GUIDE
See the code in <https://www.mathworks.com/help/matlab/creating_guis/automatically-refresh-plot-in-a-guide-gui.html the example>...

9 years ago | 1

| accepted

Answered
rotation matrix between two coordinate systems matlab
E = [e0; e1; e2] is the transformation matrix already for the rotation. There seems to be a translation of the origin in ad...

9 years ago | 1

| accepted

Answered
My system shows the following while trying to install r2016b in Windows 8.1(64)
How to solve this? The instructions are given explicitly in the message already: * After this installation is complete, you s...

9 years ago | 0

Answered
Is precision the reason my code doesn't work ?
Note that the statement data=[data]; is simply a confusing waste of time: It uses the operator for concatenating a ...

9 years ago | 1

Answered
Nested loop code to fill a 10x100 matrix
You are almost there: All you have to do is to set the element to |100*(m-1) + n|. Sorry for solving your homework, if it is ...

9 years ago | 0

| accepted

Answered
plz help me all
In 57 days? On the 11-Nov-2017? This date is known to appear in a cracked version of Matlab. It is a assumption only, but you ca...

9 years ago | 0

| accepted

Answered
How do I speed up file reading for large files with floating point numbers in scientific notation?
Text files are useful, if they are read or edited by human. This is not useful for 40GB files. Therefore it is a really bad choi...

9 years ago | 0

Answered
Euclidean distance (ED)calculation in matlab
Data = rand(347275, 64) * 1000; nData = size(Data, 1); L = nchoosek(1:nData, 2); % Not "{1:1:nData}", but a ve...

9 years ago | 3

Answered
How to speed up loading of .mat files
See: <http://www.mathworks.com/matlabcentral/fileexchange/47698-savezip> : This saves an array into a ZIP or GZIP file.

9 years ago | 0

Answered
Matrix dimensions must agree while using if
The problem is in if celestialBody == 'moon' The == operator works elementwise. Therefore the strings on the left and t...

9 years ago | 5

Answered
How do i use the timer function to execute a script at 06:00hrs each day monday through friday
Using a |timer| requires your computer to be not in sleep mode and Matlab must be running. This is rather inefficient for a "eac...

9 years ago | 1

| accepted

Load more