답변 있음
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...

8년 초과 전 | 0

답변 있음
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)

8년 초과 전 | 0

| 수락됨

답변 있음
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

8년 초과 전 | 0

| 수락됨

답변 있음
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

8년 초과 전 | 1

| 수락됨

답변 있음
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...

8년 초과 전 | 0

| 수락됨

답변 있음
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?

8년 초과 전 | 0

| 수락됨

답변 있음
How to tell MATLAB to go to the next replication i
if WHATEVER=false break; end

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 0

답변 있음
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 ...

8년 초과 전 | 1

답변 있음
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...

8년 초과 전 | 1

답변 있음
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; ...

8년 초과 전 | 1

답변 있음
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 ...

8년 초과 전 | 1

| 수락됨

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

8년 초과 전 | 0

답변 있음
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

8년 초과 전 | 0

문제를 풀었습니다


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

8년 초과 전

문제를 풀었습니다


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

8년 초과 전

답변 있음
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...

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 0

| 수락됨

문제를 풀었습니다


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

8년 초과 전

문제를 풀었습니다


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

8년 초과 전

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

8년 초과 전 | 0

| 수락됨

답변 있음
how to delete columns from matrix
a(:,all(a>=20))

8년 초과 전 | 0

| 수락됨

답변 있음
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 ...

8년 초과 전 | 1

| 수락됨

답변 있음
How to create a Looped Colum Matrix?
a=linspace(0,1,1440) a=repmat(a,365,1)

8년 초과 전 | 0

답변 있음
Finding Statistics of a Matrix Help!!!
You could reshape the matrix into a vector, then apply the functions to the vector

8년 초과 전 | 0

답변 있음
Limiting Precision on MATLAB
Could try forceSum=int32(T-W)

8년 초과 전 | 1

| 수락됨

답변 있음
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...

8년 초과 전 | 0

| 수락됨

답변 있음
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...

8년 초과 전 | 0

| 수락됨

문제를 풀었습니다


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

8년 초과 전

문제를 풀었습니다


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

8년 초과 전

더 보기