Community Profile

photo

Turlough Hughes


73 2019 年以降の合計貢献数

Turlough Hughes's バッジ

  • Knowledgeable Level 3
  • Solver
  • First Answer

詳細を表示...

貢献した分野
表示方法

回答済み
Import data from multiple .dat files, remove headerlines, and read columns into array - but the number of headerlines differs across each .dat file
If 'Dose' appears as the first four elements of this line only, and similarly 'alpha' as the first five of the other line, you c...

7日 前 | 0

| 採用済み

回答済み
Reorganize a table of points based on their coodinates
I put down an index here for sorting the points as you requested. It should do the job. ptstemp=input_points [~,idx(1)]=min(su...

7日 前 | 1

| 採用済み

回答済み
How to I locate intervals of time series data, with intervals of data having specific length and similar mean?
If you have a timeseries ts you could do the following (assuming your timeseries is in seconds) idx=ismember(ts.Time,[600:600:l...

8日 前 | 0

回答済み
Getting rid of data that does not meet conditions: Poincare section
You can get your data where x>0 as follows: ND=Data(:,find(Data(1,:) > 0)) % x > 0, for brevity I just call this ND. you can t...

8日 前 | 1

| 採用済み

回答済み
How to read this file in MATLAB?
You can use the following to read your into a variable D. fid=fopen('silicon_simr1.txt'); fgetl(fid) VarNames=fgetl(fid); st...

9日 前 | 1

回答済み
Combination of textarrow and textbox
You could do the following: xtip=0.5; ytip=0.5; % arrow tip coordinates (normalized units) w=0.15; %box width h=0.1; ...

9日 前 | 0

| 採用済み

回答済み
Improving the compactness of code
You could put them in a structure as follows: s.pop=pop; s.gdp=gdp; s.fp=fp; s.lr=lr; and then to run the loop you just itera...

13日 前 | 1

回答済み
Finding all numbers which is divisible by 5
This is your answer assuming the while loop is a must: a=input('Enter the threshold: '); disp("Following number is devided by...

13日 前 | 0

回答済み
How to concatenate these subplots on one image in matlab?
Hi Gehan, Are the images all the same size and class? If so you can just write concat_img=[V1img;H1img;D1img;A1img]; imshow(c...

17日 前 | 0

| 採用済み

回答済み
Zero padding a 3d structure according to maximum length
Hi Uerm, Lets call your data mycellarray. You can padd the second dimension of all tensors to have the same length as the one w...

17日 前 | 0

| 採用済み

回答済み
How can I compare two cells which consist of the same values, and write the row number of the first to the other file
You actually don't need to run the comparisons. The unique function provides for this directly. So just modify the second line o...

17日 前 | 0

| 採用済み

回答済み
How to find intersection of 2 matrices
There is a handy function for exactly this: [xi,yi]=polyxpoly(x_1,y_1,x_2,y_2); It requires the mapping toolbox which doesnt t...

17日 前 | 0

回答済み
Extract Structure element dynamically
I would just convert it to a cell array which is easier to index through as you require c=table2cell(timetable2table(joinedtime...

19日 前 | 0

| 採用済み

回答済み
mmread getting frames of video
To get your 10 frames each second from 0 to N seconds you can do the following (Note though that if you are converting from a st...

19日 前 | 0

回答済み
How do I retrieve a specific range of values from a cell?
Let's say your cell is called data and this is a 1 by 4 cell array with each cell containing column vectors of size 685 x 1. You...

20日 前 | 0

| 採用済み

回答済み
How to combine multiple .txt and calculate Mean, Std, Min, Max
Put all your txt files in a folder and you can then use the following myfolder='name of the folder' fils=dir([myfolder '\*.txt...

21日 前 | 1

| 採用済み

回答済み
Index exceeds - for loop
The problem is you are specifying indices that dont exist in val. val is a column vector of 10201x1 values, i.e. 10201 rows and ...

21日 前 | 0

| 採用済み

回答済み
Function returning multiple plots
Just use the hold on statement as follows: myfunction(input1); hold on; myfunction(input2); myfunction(input3); myfunction(i...

23日 前 | 0

回答済み
Feature extraction surf, storing points
One way is to store as a struct, for example s(ii).features=features; %where ii would be incrementing as you iterate through ea...

約1ヶ月 前 | 1

回答済み
iterate through text files and read them as a matrix
You have to make sure your filename and path are correct. Try modifying your input to readmatrix as follows: A=readmatrix([myf...

約1ヶ月 前 | 0

| 採用済み

回答済み
Getting rid of a for loop
The following should do the job. ind=input(1:end-2)>input(2:end-1) & input(2:end-1)<input(3:end); ind=[false; ind; false]; % ...

約1ヶ月 前 | 1

回答済み
How to match two date columns
To find the rows in your table, called dsColShort, wherein run_date and trade_date are equal you can use the following code idx...

約1ヶ月 前 | 0

| 採用済み

回答済み
seperating vertical and horizontal images from an image seperately
I'm not sure what you mean by vertical / horizontal image but from your equation it looks like you want to find the absolute d...

約1ヶ月 前 | 0

回答済み
For loops and If statements not working correctly
First of all, when you use element-wise operators (.* .^ ./) like you have been trying you don't necessarily need to run the for...

約1ヶ月 前 | 1

| 採用済み

回答済み
Help with Loops and Switch cases and Mean
Hi Deriniece, You could modify your code as follows: Q=''; ii=1; while ~strcmpi(Q,'No') Q=input('Would you like to ente...

約1ヶ月 前 | 1

回答済み
New to matlab. Trying to code with excel.
[data,varnames]=xlsread('myfilename.xlsx') sumdata=sum(data); % sumation of columns T=array...

約1ヶ月 前 | 0

回答済み
Read & Plot to compare Data in Multiple SpreadSheets
Hi Raghnu, I reckon you should store your data in a structure and use dynamic fieldnames to have a fieldname corresponding to e...

約1ヶ月 前 | 0

| 採用済み

回答済み
How to add values from if statements to a column
You just have to make an index for every time your if statement is satisfied. See the modified code. function [x,y]=valuesof(da...

約1ヶ月 前 | 1

| 採用済み

回答済み
Collect double values of a matrix
Ok Following your comment I've edited my answer: I would first find rows which have equal X and Z values. c=1; for ii=1:size(...

約1ヶ月 前 | 0

回答済み
Select a point on the graph
You can do the following: [~,ind]=min(sqrt(member_value(:,1).^2+member_value(:,2).^2)); %find index for point closest to origin...

約1ヶ月 前 | 0

Load more