回答済み
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年 前

さらに読み込む