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

alrededor de 8 años hace | 0

Respondida
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)

alrededor de 8 años hace | 0

| aceptada

Respondida
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

alrededor de 8 años hace | 0

| aceptada

Respondida
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

alrededor de 8 años hace | 1

| aceptada

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

alrededor de 8 años hace | 0

| aceptada

Respondida
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?

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 0

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

alrededor de 8 años hace | 0

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

alrededor de 8 años hace | 1

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

alrededor de 8 años hace | 1

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

alrededor de 8 años hace | 1

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

alrededor de 8 años hace | 1

| aceptada

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

alrededor de 8 años hace | 0

Respondida
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

alrededor de 8 años hace | 0

Resuelto


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

alrededor de 8 años hace

Resuelto


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

alrededor de 8 años hace

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

alrededor de 8 años hace | 0

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

alrededor de 8 años hace | 0

| aceptada

Resuelto


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

alrededor de 8 años hace

Resuelto


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

alrededor de 8 años hace

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

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 1

| aceptada

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

alrededor de 8 años hace | 0

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

alrededor de 8 años hace | 0

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

alrededor de 8 años hace | 1

| aceptada

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

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 0

| aceptada

Resuelto


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

alrededor de 8 años hace

Resuelto


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

alrededor de 8 años hace

Cargar más