Beantwortet
how to avoid 'two for loop'?
How about using a <https://www.mathworks.com/help/matlab/math/matrix-indexing.html matrix indexing> technique as follows: f...

etwa 9 Jahre vor | 1

| akzeptiert

Beantwortet
str2double('00010001') or str2num('00010001') gives output as 10001 by ignoring the MSB '000' bits how to retain them?
I think you want to generate a list of file names with serial number whose prefix is '0001'. If so, the following code will help...

etwa 9 Jahre vor | 0

Beantwortet
Why my Matlab plot is giving blank figure although corresponsing arrays are being created?
I have modified your code as follows. Please remember that the following code plots *abs(P_in)* and *abs(P_out)*, because both p...

etwa 9 Jahre vor | 0

| akzeptiert

Beantwortet
Need help with solving equations
How about the following code. This code plots 'a' and 'b' as a function of 'y' where 'x' = 1 (constant). A = [2 1;1 -30]; ...

etwa 9 Jahre vor | 1

| akzeptiert

Beantwortet
indexing using for loop
Of course you can do it with using *for* loop and *if* statement. But MATLAB can do it much better way like this: x = rand...

etwa 9 Jahre vor | 0

Beantwortet
Gaussian kernel scale for RBF SVM
Assuming the RBF kernel function with scaling parameter (gamma) as follows: <</matlabcentral/answers/uploaded_files/71801/RBF...

etwa 9 Jahre vor | 5

| akzeptiert

Beantwortet
Creating zero value vectors with for-loop
I would like to re-post it. Thank you, Jan-san! m1 = 1275; f = cell(m1,1); for kk = 1:m1 f{kk} = zeros(kk, 1); ...

etwa 9 Jahre vor | 1

| akzeptiert

Beantwortet
In row mean of consecutive columns up to end
I think *splitapply* function will help. Please try the following code. A = rand(1,100); % Example group = reshape(repmat...

etwa 9 Jahre vor | 1

Beantwortet
How does the following syntax may be shortened and improved?
How about trying this? A = rand(12,13); SELECTED_A = zeros(6,13); for kk=1:6 if A(2*kk-1,9) > A(2*kk,9) ...

etwa 9 Jahre vor | 0

| akzeptiert

Beantwortet
Using a loop for repeating steps
Just in case, let me copy&paste my comment to the answer section. N = 1000; RowNumber = zeros(N,1); for kk=1:N R...

etwa 9 Jahre vor | 1

Beantwortet
How to plot Cell Array full of doubles.
How about using *cell2mat* function? Here is a simple example. C = num2cell(randn(257,1)); % 257-by-1 cell array D = ce...

etwa 9 Jahre vor | 0

Beantwortet
How to change a matrixvalue dependent on the previous matrixvalue?
I think the following code should be alternative. idx = [(T(2:end,:) > 0) & (T(1:end-1,:) < T(2:end,:)); logical(zeros(1,si...

etwa 9 Jahre vor | 0

| akzeptiert

Beantwortet
Matlab random number and while loop
This is because *B~= zeros(1,N)* returns 1-by-N logical array. Please revise the first line of your code to *while any(B ~= z...

etwa 9 Jahre vor | 2

| akzeptiert

Beantwortet
Simple for loop efficiency
How about doing this. table{:,1} = (table{:,1}-table{1,1})/fs*1000; And let's check the calculation time. fs = 100; ...

etwa 9 Jahre vor | 1

| akzeptiert

Beantwortet
How to build a growing square matrix with the following values?
I think this code will generate the matrix. n = 10; k = ones(n+1,1); for kk = 1:n A = - diag(k(1:kk)) - diag(k...

etwa 9 Jahre vor | 0

| akzeptiert

Beantwortet
How can I replace a matrix of zeros with other values in one command?
F = [zeros(2,6);[zeros(1,2),8:-2:2]]; It works. But there would be more sophisticated way...

etwa 9 Jahre vor | 0

Beantwortet
Replace NaN's in table with zero
If you have R2016a or later version, you can use <https://www.mathworks.com/help/matlab/ref/ismissing.html ismissing> function a...

etwa 9 Jahre vor | 10

Beantwortet
How can I plot a graph for only one eigen value against a variable? I'm only getting one M!
I have slightly modified your code. I hope this will help! A=3.3; B=0.45; a=B; b=((A+sqrt(A^2-4*B^2))/(2*B))^2; ...

etwa 9 Jahre vor | 1

| akzeptiert

Beantwortet
How to fill a matrix in a specific way
I think |diag| function will help. https://www.mathworks.com/help/matlab/ref/diag.html Please try the following script. ...

etwa 9 Jahre vor | 1

Beantwortet
Train Linear SVM Model
The predictors "values(:,1:50)" should be numeric matrix. I would like to recommend checking it again.

mehr als 9 Jahre vor | 0

Kanal


Data

mehr als 9 Jahre vor