問題


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 | 202 個のソルバー

解決済み


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 | 38 個のソルバー

解決済み


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

さらに読み込む