Beantwortet
How do I remove white spaces on the command window after the answer prints a string?
Use fprintf to ontrol the output exactly. Relying on the implicit calling of display() has less ways to influence the output.

fast 5 Jahre vor | 0

Beantwortet
can't store the output of a definite integral using int(f, a, b ) in a matrix initialized with zeros
G(i,j) = int((p4{i}*p4{j}/den),[0,1]); G is a numerical variable and the output of int() is a symbolic variable. You cannot st...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
About preallocating for speed
for K = 1:M ... TSE_Lin(K) = norm(e)^2; CR(K) = (2 * K) * 100 / N; end The variables TSE_lin and CR grow in ...

fast 5 Jahre vor | 0

Beantwortet
Normal vector from points in 3d space
See https://www.mathworks.com/matlabcentral/fileexchange/22042-plane_fit https://www.mathworks.com/matlabcentral/answers/49621...

fast 5 Jahre vor | 0

Beantwortet
How to read 8-byte floating point numbers from binary?use fread
With 'ieee-le' format the bytes are read in the order [8,7,6,5,4,3,2,1], with 'ieee-be' as [1,2,3,4,5,6,7,8]. There is no format...

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
Create random regular matrix (Matlab)
Having m ones in each column and n ones in each row works only, if the the resulting matrix has the size [a*m, a*n]. A construc...

fast 5 Jahre vor | 2

| akzeptiert

Beantwortet
I'm not able to read audio file >4GB
If you can store a 5GB file on the disk, the disk cannot be formated in FAT32. This means, that the limit is caused by the file ...

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
Calculate delta time in seconds
Starttime = "28-Jun-2021 05:05:38"; Stoptime = "28-Jun-2021 05:15:38"; Deltatime = compose("%d", seconds(datetime(Stoptime) -...

fast 5 Jahre vor | 1

Beantwortet
Merging rows of a matrix into a number
C = [345 679 158]; D = rem(floor(C ./ [100, 10, 1]), 10)

fast 5 Jahre vor | 1

Beantwortet
Problem with subplot ful screen
Yes, of course. You are creating a 10x2 table of plots: subplot(10,2,1) % ^^ Use subplot(5, 2, k) for a 5x2 table.

fast 5 Jahre vor | 0

Beantwortet
Functions name duplication in toolbox
What about using builtin('kmeans') to call the Matlab version? [EDITED: This does not work. Thanks, Steven Lord] Did you add yo...

fast 5 Jahre vor | 0

Beantwortet
How do I get r2016a?
I'm not sure if this shortcut is working for you: https://www.mathworks.com/downloads/ If not, open "May Account" on your prof...

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
Code for romberg integration using recursion
The posted code runs without an error in R2021b. eps_step = 1e-5; N = 11; a = 0; b = 1; R = zeros( N + 1, N + 1 ); h = b -...

fast 5 Jahre vor | 0

Beantwortet
How to decompose 3d array to 3 matrices
x = rand(51, 71, 3); v = reshape(x(:, 27, :), [], 1); size(v)

fast 5 Jahre vor | 0

Beantwortet
How to accelerate the permute for 3D matrix
You can't. permute works efficiently already.

fast 5 Jahre vor | 0

Beantwortet
How to download data using proper link
FileName = 'prov.postprocess+sMpAn+dMOD08_M3_6_1_Deep_Blue_Aerosol_Optical_Depth_550_Land_Mean_Mean+zNA+t20010101000000_20201231...

fast 5 Jahre vor | 0

Beantwortet
Generate a matrix of combinations without repetition (array exceeds maximum array size preference)
Instead of permuting [0,0,1,1] and removing the duplicates, you can obtain the list of indices of the ones (or zeros): M1 = uni...

fast 5 Jahre vor | 2

| akzeptiert

Beantwortet
Infinite looping: Knowing its presence in a big program?
See: https://en.wikipedia.org/wiki/Halting_problem You can prove, that there are no "tricks" to determine securely in advance i...

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
Run two scripts simultaneously matlab
The easiest way is to start 2 Matlab sessions.

fast 5 Jahre vor | 0

Beantwortet
Sorting cell for only dublicate values
Is the input really a cell containging strings? Or a cell string? Ort a string array? % Test data with a cell string: data = s...

fast 5 Jahre vor | 1

Beantwortet
Divided difference(Newton metod)
There was a missing closing parenthesis. The trailing esmivolon suppresses the output. If you omit it, this is displayed: test ...

fast 5 Jahre vor | 1

Beantwortet
why is my vector empty
for i=1:size(A,1) disp(double(A{i})) end i = size(A,1) now. Then: row_=(double(A{i})); Is a vector of the ASCII values o...

fast 5 Jahre vor | 0

Beantwortet
Add a textbox in a subplots inside a loop
Move the repeated code out of the loop to simplify the code: z = [0.44, 4.7, 7, 8, 17.9, 31, 57]; dim = [.2 .5 .3 .3]; c ...

fast 5 Jahre vor | 0

Beantwortet
Why does mldivide solve equations so fast that FORTRAN can't compare it?
Matlab's code for the matrix division is not made public. Internally optimized BLAS libraries and MKL are used. The taskmanager ...

fast 5 Jahre vor | 0

Beantwortet
Converting a binary matrix to decimal.
The error message is clear: bin2dec requires a CHAR vector as input or a cell string. See: doc bin2dec You provide a numerical...

fast 5 Jahre vor | 1

Beantwortet
Error in Bvp4c
You define the variable beta on top of the code, but this does not mean, that it is known in all subfunctions. Pr, gamma and lam...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
How to normalize a matrix in such a wat that every row sum of X(:,:,i) should be 1 except for ith row
X = rand(6, 3, 6); N = sum(X, 2); N(sub2ind(size(N), 1:6, ones(1,6), 1:6)) = 1; Y = X ./ N; Now sum(Y(i, :, j)) is 1 is i~=j...

fast 5 Jahre vor | 0

Beantwortet
Faster for loops/or how to cut some time
a=randn(50,1); b=randn(50,1); tic [aa,bb]=using_cells2(a,b); eloopC=length(aa); eloopP=length(bb); for i=1:(eloopC) ...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
Get the time of the messages
Try: Time_Matching = Time_AIS1(msg_match{K}) % curly braces

fast 5 Jahre vor | 0

Beantwortet
find maximum number in a range of data
In max(T(S1,6)) you are searching in the submatrix T(S1, :). But you use the result as index in the full matrix T. You want to a...

fast 5 Jahre vor | 0

| akzeptiert

Mehr laden