Answered
converting a matrix into a column vector using only while-end loop
This sounds like a homework question and you have shown, what you have tried so far. function A = func4(M) [m,n] = size(M); A...

21 giorni ago | 0

| accepted

Answered
Rename files after a certain string in the file itself appears
An explicit example would be useful: old name and new name. Maybe: files_csv = dir('*.csv'); for i = 1 : length(files_csv) ...

21 giorni ago | 0

| accepted

Answered
what's the code inside angle2dcm?
While I cannot find the code of angle2dcm , the equivalent function eul2rotm is useful for the explanation also. It produces the...

21 giorni ago | 0

Answered
I am trying to make a new matrix for each iteration of a for loop
Q_bar = cell(1, length(theta)); for i = 1:length(theta) m = cosd(theta(i)); n = sind(theta(i)); T1 = [m^2, n^2, ...

21 giorni ago | 1

Answered
While loop execution with multiple numeric and logical conditions
The code looks fine. Do you have a problem with it? It is a good programming practice to avoid repeated code. Maybe this is "cl...

21 giorni ago | 1

| accepted

Answered
Failure in initial objective function evaluation. FSOLVE cannot continue.
You provide a handle to a script. This cannot work, because fsolve expects a function handle. Most likely you want: fsolve(@fcn...

21 giorni ago | 0

| accepted

Answered
Error using quiver The size of X must match the size of U or the number of columns of U.
x = -10:10; % No need for meshgrid since Matlab R2016b y = (-10:10).'; % simply use a row and a column vector k = 1; q...

21 giorni ago | 1

| accepted

Answered
How does MATLAB REALLY pass arguments to functions?
See this blog about inplace operations: https://blogs.mathworks.com/loren/2007/03/22/in-place-operations-on-data/ And the docum...

21 giorni ago | 2

| accepted

Answered
How to register high resolution images of same modality?
If you image is stored in double format, it uses 10 GB of RAM. On a 64 GB machine this should work. So is installing more RAM an...

21 giorni ago | 1

Answered
How to campare signals with different length?
It depends. You can compare two sine waves, if one has 80 and the other one 75 samples. But how do you define "similarity"? You...

21 giorni ago | 0

Answered
How to I iterate a random selection among given elements without selecting the same element twice?
By the way, your code wouzld be much cleaner and shorter, if you use arrays instead of hiding indices in the field names: Define...

21 giorni ago | 1

| accepted

Answered
What are the ideal computer specs for parallel computing with large data sets?
If the RAM is exhausted, the SSD or HDD is used as virtual RAM. This slows down the processing massively. You would see this by ...

22 giorni ago | 2

| accepted

Answered
Error when saving figure with linux command line
In batch mode, Matlab does not support interactive GUI elements. How do you save the figure as PNG? See: https://www.mathworks....

22 giorni ago | 0

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
Schwerp_X = first_Moment_X./en_density; Schwerpunkte_X(i) = Schwerp_X; first_Moment_X is a vector, so is Schwerp_X,...

22 giorni ago | 0

| accepted

Answered
How do I vectorize my nested for loops for a convolution operation example?
Not a vectorization, but some tiny changes, which let the code tun 30% faster (at least in Matlab online - test this locally!): ...

22 giorni ago | 0

| accepted

Answered
Count number of lines between strings in a text file.
S = readlines(filename); Index = find(startsWith(S, '#')); Len = diff(Index) - 1 % Length of the blocks

22 giorni ago | 0

| accepted

Answered
Generating a Dictionary Function
function Word Data = fileread('YourDictionary.txt'); List = sort(lower(strsplit(Data, char(10)))); while 1 s = input('I...

22 giorni ago | 0

Answered
Calculate the distance between points in a large data set
Do not create a pile of variables but a vector, which contains the distances: Distance = sqrt(diff(x).^2 + diff(y).^2);

22 giorni ago | 0

Answered
Warning: Executing startup failed in matlabrc.
The message you show indicates, that it is a warning, not an error. Does Matlab stop with an error in addition? If it is a warn...

22 giorni ago | 0

Answered
How to disable uicontrol 'mouseless' interaction
If you click on an uicontrol element, it gets the focus. Then following keyboard events are caught be the keyboard handling of t...

23 giorni ago | 0

| accepted

Answered
Reading multiple txt files and placing numerical data in a matrix
See: FAQ: How can I process a sequence of files? [filename, pathname] = uigetfile('*.txt','MultiSelect','on'); filename = cell...

23 giorni ago | 0

Answered
4th order Runge Kutta method for differential equations using a tolerance
A bold guess: du_dR = 4*pi*e_d*R.^2; dt_dR = -4*pi*R.*((dP_dt).^-1)*((P_n+e_d)./(1-2*u./R))*((P_n+u)./(4*pi*R.^2)); % Now du_...

23 giorni ago | 0

Answered
Why do I receive Index in position 1 exceeds array bounds. Index must not exceed 5 for the code?
You have redefined a command as a variable. This might be input, text, plot, str2num, imag, isscalar, mod, dec2bin, ... If you s...

25 giorni ago | 1

Answered
Error message: Too many input arguments
result = round(matr * 10000) / 10000

25 giorni ago | 0

Answered
finding if number(iteration) is the sum of 2 numbers inside same array - matlab
x = [20 40 50 60 80 100]; n = numel(x); % Number of elements index = nchoosek(1:n, 2); % Pairs of elements ...

25 giorni ago | 0

Answered
Help plss i always gets error message while running this code
The problem is in the first line already: syms Fab,Fad,Fbc,Fbd,Fcd,Fce,Fde,Ax,Ay,Ey; % ^ ^ ^ ^ ^ ^ ^ ^ ^ ...

25 giorni ago | 0

Answered
Calculating mean of signal between certain time interval in a loop.
Use findchangepts to determine the constant time phase. Then calculate the mean.

25 giorni ago | 0

Answered
answer orange badge abadonned?
Level8, MVP, Staff, Editor, *, ... Are these colorful badges useful or are they used to increase the level of certain chemicals...

25 giorni ago | 1

Answered
HOW TO REPLACE SPECIFIC ELEMENTS IN A MATRICE?
A = rand(5, 5); A(2:3, 3) = 0; A(4, 3:5) = 0; Is this a homework question? If so: what a pity that you did not try it by yo...

25 giorni ago | 0

| accepted

Answered
What is error array 3-by-0?
Let the debugger help you to analyse the problem. Type this in the command window: dbstop if error Then let the code run again...

28 giorni ago | 0

| accepted

Load more