답변 있음
Finding allowed inputs to a function
Not in general. If a function uses the modern arguments block (since R2019b), this is possible. But many users are running older...

대략 4년 전 | 0

답변 있음
how to find sum different data for two different variables using loop in matlab
Maybe you want to do: "Multiply each element of vector a with all elements of vector b, devide by 100 and get the sum of all res...

대략 4년 전 | 0

답변 있음
Matrix is singular to working precision
Why do you assume, that something is wrong? The provided matrix is near to singular. In 1-D this would mean, that you try to div...

대략 4년 전 | 0

답변 있음
Solve the following simultaneous equations:
f1 = @(t,y) [-X/theta+(1+alpha)*y1(1-X)*Y^2+beta*y1(1-X)*Z^2; ... ... % ^ ^ * are ...

대략 4년 전 | 0

| 수락됨

답변 있음
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...

대략 4년 전 | 0

| 수락됨

답변 있음
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) ...

대략 4년 전 | 0

| 수락됨

답변 있음
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...

대략 4년 전 | 0

답변 있음
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, ...

대략 4년 전 | 1

답변 있음
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...

대략 4년 전 | 1

| 수락됨

답변 있음
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...

대략 4년 전 | 0

| 수락됨

답변 있음
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...

대략 4년 전 | 1

| 수락됨

답변 있음
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...

대략 4년 전 | 2

| 수락됨

답변 있음
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...

대략 4년 전 | 1

답변 있음
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...

대략 4년 전 | 0

답변 있음
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...

대략 4년 전 | 1

| 수락됨

답변 있음
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 ...

대략 4년 전 | 2

| 수락됨

답변 있음
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....

대략 4년 전 | 0

답변 있음
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,...

대략 4년 전 | 1

| 수락됨

답변 있음
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!): ...

대략 4년 전 | 0

| 수락됨

답변 있음
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

대략 4년 전 | 0

| 수락됨

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

대략 4년 전 | 0

답변 있음
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);

대략 4년 전 | 0

답변 있음
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...

대략 4년 전 | 0

답변 있음
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...

대략 4년 전 | 0

| 수락됨

답변 있음
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...

대략 4년 전 | 0

답변 있음
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_...

대략 4년 전 | 0

답변 있음
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...

대략 4년 전 | 1

답변 있음
Error message: Too many input arguments
result = round(matr * 10000) / 10000

대략 4년 전 | 0

답변 있음
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 ...

대략 4년 전 | 0

답변 있음
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; % ^ ^ ^ ^ ^ ^ ^ ^ ^ ...

대략 4년 전 | 0

더 보기