Answered
How can I import "curl" API in MATLAB using webread function?
What about using curl instead? This is included in Linux, MacOS and Windows also: system(['curl "https://www.sapsailing.com/sai...

4 years ago | 1

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

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...

4 years 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) ...

4 years 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...

4 years 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, ...

4 years 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...

4 years 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...

4 years 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...

4 years 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...

4 years 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...

4 years 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...

4 years 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...

4 years 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 ...

4 years 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....

4 years 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,...

4 years ago | 1

| 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!): ...

4 years 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

4 years 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...

4 years 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);

4 years 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...

4 years 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...

4 years 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...

4 years 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_...

4 years 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...

4 years ago | 1

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

4 years 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 ...

4 years ago | 0

Load more