문제


Count letters occurence in text, specific to words with a given length.
Build a function with two input arguments: a string and a word length (number of letters), that outputs a vector of counts of th...

13년 초과 전 | 4 | 솔버 수: 205

문제를 풀었습니다


Count letters occurence in text, specific to words with a given length.
Build a function with two input arguments: a string and a word length (number of letters), that outputs a vector of counts of th...

13년 초과 전

답변 있음
Managing Matrix Content Using Loop ?
>> A = magic(3) % Just an example.. A = 8 1 6 3 5 7 4 9 2 >> v = A(:)...

13년 초과 전 | 0

| 수락됨

답변 있음
Can you split a vector according to a pre-defined sequence?
id = zeros(numel(M), 1) ; id(1+cumsum(P)) = 1 ; id = 1 + cumsum(id(1:end-1)) ; result = accumarray(id, M(:)).' ; With...

13년 초과 전 | 1

답변 있음
find where number changes in a matrix
>> [r,c] = find(diff(X,1,2)) ; >> loc = [r, c+1] loc = 2 2 2 3 3 4

13년 초과 전 | 0

| 수락됨

답변 있음
how to delete an element from a particular position from a vector of repetitive elements
You might just want to use UNIQUE.. >> b = unique(A) ;

13년 초과 전 | 0

| 수락됨

답변 있음
Overlapping time-intervals WITHOUT for/while loops?
*EDIT as it's not a HW* There are several methods for doing this, in particular based on ARRAYFUN/BSXFUN that perform the FOR...

13년 초과 전 | 4

| 수락됨

문제


Find names/words that start and end with the same letter.
Find names/words (from a string) that start and end with the same letter. * Case-insensitive. * If a name/word is not at the...

13년 초과 전 | 2 | 솔버 수: 40

문제를 풀었습니다


Find names/words that start and end with the same letter.
Find names/words (from a string) that start and end with the same letter. * Case-insensitive. * If a name/word is not at the...

13년 초과 전

답변 있음
How do a read a text file as fixed width columns as in Excel?
You could go for something like the following: colw = [4,2,3,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5] ; buffer =...

13년 초과 전 | 0

답변 있음
Xlswrite in a loop
It would be more efficient to build an array (or a cell array if you have inhomogeneous/non-numeric content) in the loop, and to...

13년 초과 전 | 0

답변 있음
Missing something obvious? (fscanf)
If you need to stick to FSCANF, you can do fid = fopen('Data.txt', 'r') ; data = fscanf(fid, '%f', [24, 5]) fclose(fid) ...

13년 초과 전 | 0

| 수락됨

답변 있음
Importing only specific entries from a text file to matlab
Regular expressions are probably your best option. Look at the following: >> s = 'Select type (A or B or C): C Enter the num...

13년 초과 전 | 0

| 수락됨

답변 있음
How can I copy two rows
B = A(1:2,:) ; or B = A([1,2],:) ;

13년 초과 전 | 0

답변 있음
how to include row pitch yaw?
Leaving for the night, but here are a few relevant topics if you want to start with a bit of theory: * <http://en.wikipedia.o...

13년 초과 전 | 1

| 수락됨

문제를 풀었습니다


Return the Nth Output from an Input Command
*Description* Given _F_, a cell array whose first element is a function handle and subsequent elements are arguments, return ...

13년 초과 전

문제를 풀었습니다


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

13년 초과 전

답변 있음
I am not sure how to even get started. I am supposed to use feof to open the file but I cannot get it to work. Can anyone show me how to use feof? Thanks
In the command window, type the following command: doc feof you will find there a very illustrative example. FEOF doesn't...

13년 초과 전 | 0

| 수락됨

문제를 풀었습니다


Get the area codes from a list of phone numbers
Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-647...

13년 초과 전

문제를 풀었습니다


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

13년 초과 전

문제를 풀었습니다


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

13년 초과 전

답변 있음
How to find subsets of a set or a column
A solution could be .. >> data = {'high', 'high', 'high', 'medium', 'low', 'low', 'low', 'medium', ... 'low', '...

13년 초과 전 | 1

| 수락됨

문제를 풀었습니다


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

13년 초과 전

문제를 풀었습니다


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

13년 초과 전

문제를 풀었습니다


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

13년 초과 전

답변 있음
Cell arrays and the unique function
You can proceed as follows: >> c = {1, 2, 3, 4} c = [1] [2] [3] [4] >> [c{:}] ans = 1 2 ...

13년 초과 전 | 0

| 수락됨

답변 있음
How to Cope XLS Worksheet using Matlab
You can actually write data into an existing, preformated worksheet using xlswrite, because it doesn't change the format. If you...

13년 초과 전 | 0

답변 있음
Is this code correct? completed HW (basis of Null(A) Col(A) and Row(A))
Hi Manuel, I can't check the methodology, but here are a few comments based on what I could see in a glimpse. *About |ColR...

13년 초과 전 | 0

답변 있음
How can I avoid using a for loop
yy2 = reshape(y, [], 4) ; I named it |yy2| so you can compare with your |yy|.

13년 초과 전 | 0

답변 있음
cannot get my equations to recognise my vector syntax
In A = ((1-y(:,1)-y(:,2))*0.5)+(y(:,1)*0.25)+(y(:,2)*0.75); % albedo you are trying to access all rows of column 2 of |y...

13년 초과 전 | 0

더 보기