已回答
How to keep unique rows
You can determine the common values between the two cell arrays with <https://uk.mathworks.com/help/matlab/ref/intersect.html in...

6 years 前 | 1

| 已接受

已回答
merging date and time
Nicole, the following example should help you in what you are trying to do. I have added some comments in the code to help you. ...

6 years 前 | 3

已回答
Replacing NaN with the average of previous and next cell value
If you are working with a table: %Table. var = {'time';'exp1'}; time = [1;2;3;4;5;6;7;8]; exp1 = [45;67;78;NaN;80;81;8...

6 years 前 | 1

已回答
How to Separte table data from html?
You should be using <https://uk.mathworks.com/help/matlab/ref/webread.html webread> rather than <https://uk.mathworks.com/help/m...

6 years 前 | 0

| 已接受

已回答
picking maximum difference across entries of row vectors
Perhaps a simpler solution which only requires a sort: A = [1 3 6 7 10]; A = sort(A); B = A(end) - A(1); B = ...

6 years 前 | 1

| 已接受

已回答
Different colors for each item in listbox of an app designer
It is possible to change the color of a uicontrol popup element as explained <https://uk.mathworks.com/matlabcentral/answers/78...

6 years 前 | 0

提问


regexprep incorrect multiple replacement
I am trying to replace numbers in a char vector with different numbers using <https://uk.mathworks.com/help/matlab/ref/regexprep...

6 years 前 | 1 个回答 | 1

1

个回答

已解决


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

6 years 前

已解决


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

6 years 前

已解决


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

6 years 前

已回答
How to change value in a table so the old one is no longer in the table
You can remove categories from categorical arrays using <https://uk.mathworks.com/help/matlab/ref/removecats.html removecats>. ...

6 years 前 | 1

| 已接受

已回答
Extract Data from Timetable
This example will help you. A datetime matrix: daytimemat = datetime(['13/04/2018';'25/04/2018';'28/04/2018'],'Format',...

6 years 前 | 0

| 已接受

已回答
How do I return the indices of randomly sampled matrices?
The following code uses <https://uk.mathworks.com/help/matlab/ref/find.html find> to search for Arand elements in matrix A, and ...

6 years 前 | 0

已回答
How can I use xlswrite in a for loop without overwriting?
If you wish to create a new Excel file for every iteration of the loop, you can use: xlswrite(strcat('frequency',num2str(i)...

6 years 前 | 1

| 已接受

已回答
I am looking for a code to identify if the entered number is odd or even. For example: "ABC 123", I would be really grateful if someone shares the code.
You need to remove the characters before using mod function. You can use <https://uk.mathworks.com/help/matlab/ref/regexp.html ...

6 years 前 | 0

| 已接受

已回答
How to split the time interval (format-duration) column based on specific intervals
Hi Abdul, The following code reads from a .csv file and splits the column as you requested in two different arrays, Morning a...

6 years 前 | 1

| 已接受

已回答
How could i search a text for varying patterns
For a pattern of two to three letters, starting with any letter (A to Z) and ending with any letter (A to Z) you can use the fol...

6 years 前 | 1

| 已接受

已回答
Saving with filename from excel
It does not work because the string contained in _fname_ is wrapped inside a cell. You must convert the cell to the data type...

6 years 前 | 1

| 已接受

已解决


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

6 years 前

已解决


Is my wife right?
Regardless of input, output the string 'yes'.

6 years 前

已解决


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

6 years 前

已解决


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

6 years 前

已回答
Combine columns of multiple arrays using for loop
Hi Charlotte, The following code creates a <https://uk.mathworks.com/help/matlab/math/multidimensional-arrays.html multidimen...

6 years 前 | 0

已回答
Function file that removes a character in a string?
Two alternatives if you are not allowed to use strrep. function [strOut] = RemoveDash(str) k = strfind(str,'-'); str(...

6 years 前 | 1

已回答
Translating curl into Matlab/Webwrite
Hi Frank, Weboptions allows you to add headers to the POST request. %Body of POST request. data = struct('units',100...

6 years 前 | 4

已回答
How to arrange a Matrix in different shape?
B = fliplr(A)

6 years 前 | 0

| 已接受

已回答
How do I read Folders with subfolders ?
There are many ways you can do this. One way is the following: %Find all images in subfolders with .jpg extension. ima...

6 years 前 | 1

已回答
Retrieving data from a web page
Hi Enrico, try the following: url = 'http://ricercaweb.unibocconi.it/criospatstatdb/csv/rep06a_'; prompt = 'Enter compa...

6 years 前 | 1

| 已接受