Beantwortet
How to ask the user to check avalue from a loop
I'm not entirely sure I understand what you are trying to do, but if you just want to get basic input from the user then see the...

mehr als 8 Jahre vor | 0

Beantwortet
How can I split a column?
Maybe I'm misunderstanding, but can't you just index it out: col1=data(:,1:8) col2=data(:,9:16)

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
For a value 0<i<=4 give k=1, 4<i<=8 give k=2 and so on
for i=1:100 k=floor((i-1)/4)+1 end

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to multiply just certain elements of a column in a matrix by a factor?
testMat=ones(20,3) testMat(5:10,3)=testMat(5:10,3).*0

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
how do i do a for loop to find different array sizes
mode would have to be a cell array since the number of columns of each array is not the same i.e mode{1} = [1 2 3]; mode...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to remove Y value for given X
data=[1 0.4;2,0.6;3,0.2;4,0.6;5 0.9] index=data(:,1)==4; data(index,2)=NaN Something like this?

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to tell MATLAB to go to the next replication i
if WHATEVER=false break; end

mehr als 8 Jahre vor | 0

Beantwortet
How can I save matrices created in a for loop in the workspace?
I'm not entirely certain I'm fully getting the gist of your question but, save(filename) will save all workspace var...

mehr als 8 Jahre vor | 0

Beantwortet
Generate a table of conversions from degrees (first column) to radians (second column). Degrees should go from 0⁰ to 360⁰ in steps of 10⁰. Recall that π radians = 180⁰
%Create Table conversionTable=table() %Add degrees column conversionTable.Degrees=(0:10:360)' %Add radians column ...

mehr als 8 Jahre vor | 1

Beantwortet
setting format in workspace view
It probably occurs when the number becomes too large or too small to be represented by the long fixed decimal format. It will al...

mehr als 8 Jahre vor | 1

Beantwortet
Find neighboring nodes in a list of node positions
Something like this: x = randn(10,1); y = randn(10,1); %set desired distance maxDistance=1.6; ...

mehr als 8 Jahre vor | 1

Beantwortet
How can I remove an entire row of zeros in a matrix?
a=[45 23 54;0 0 0;9 3 32]; zero=a==0; ind=all(zero,2); a(ind,:)=[] Presumably the entire row has to have ...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
char to binary converting
bin2dec(string) will convert your string to a decimal equivalent. The underlying representation of the decimal number will be bi...

mehr als 8 Jahre vor | 0

Beantwortet
Compare segments of a vector
ind=repmat(logical([0 0 0 0 0 1 1 1 1 1]),1,100) b=a(ind) a(ind)=[] c=a>b

mehr als 8 Jahre vor | 0

Gelöst


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

mehr als 8 Jahre vor

Gelöst


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

mehr als 8 Jahre vor

Beantwortet
Averaging rows with same name
Generally vectorized code will run faster than equivalent solutions with loops. Though, personally I don't find it all that intu...

mehr als 8 Jahre vor | 0

Beantwortet
Creating Identity Vectors Using FOR Loop
Or if you really wanted to make them all totally separate... A = zeros(1,4); B = zeros(1,4); C = zero...

mehr als 8 Jahre vor | 0

| akzeptiert

Gelöst


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

mehr als 8 Jahre vor

Gelöst


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

mehr als 8 Jahre vor

Beantwortet
Reshape matrix in the desired form
B=[reshape(A(:,:,1)',1,16);reshape(A(:,:,2)',1,16)]

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
how to delete columns from matrix
a(:,all(a>=20))

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
My code works except variable s remains fixed to 20 when it should be changing depending on the values of input for variable x
The value of x will have been changed by your first decision structure, so by the time you test it again in the second decision ...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
How to create a Looped Colum Matrix?
a=linspace(0,1,1440) a=repmat(a,365,1)

mehr als 8 Jahre vor | 0

Beantwortet
Finding Statistics of a Matrix Help!!!
You could reshape the matrix into a vector, then apply the functions to the vector

mehr als 8 Jahre vor | 0

Beantwortet
Limiting Precision on MATLAB
Could try forceSum=int32(T-W)

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
AF1 contains values calculated by a formula in an angle range of [-90 90]. But I am getting index exceeds matrix dimensions error in f=pks(1) line. Trying this for 8 days but not getting.
At a guess, the findpeaks function is returning nothing so when you try to index into it, it produces an error. Presumably you'v...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Nested For Loops help
You're not retaining the variable 'diff' but just keep replacing it with the latest subtraction. You could initialize diff=[] be...

mehr als 8 Jahre vor | 0

| akzeptiert

Gelöst


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

mehr als 8 Jahre vor

Gelöst


Rotate input square matrix 90 degrees CCW without rot90
Rotate input matrix (which will be square) 90 degrees counter-clockwise without using rot90,flipud,fliplr, or flipdim (or eval)....

mehr als 8 Jahre vor

Mehr laden