Community Profile

photo

Stephen


2014 이후 활성

Suspensa Vix Via Fit

Statistics

All
  • Grand Master
  • Personal Best Downloads Level 4
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 5
  • GitHub Submissions Level 3
  • First Submission
  • 36 Month Streak
  • Thankful Level 4
  • Revival Level 2
  • Knowledgeable Level 4
  • First Answer

배지보기

Content Feed

보기 기준

답변 있음
Replace comma with dot after fopen
fnm = 'trial_file.txt'; opt = detectImportOptions(fnm, 'VariableNamesLine',9, 'VariableUnitsLine',10, 'DecimalSeparator',',', '...

약 14시간 전 | 1

답변 있음
How to split array into sub arrays?
"I have a feeling that creating individual variables is not most efficient method..." Creating lots of individual variables wou...

3일 전 | 0

| 수락됨

답변 있음
Writing pressed key to variable
I suspect that you are getting synchronous code (e.g. the evaluation of a script or function) mixed up with asynchronous code (e...

3일 전 | 0

답변 있음
Array don't store value?
Replace n = linspace(t01,t11,h); % Read its help to know why your useage is incorrect. with n = t01:h:t11;

4일 전 | 0

| 수락됨

답변 있음
How to create a vector inside a loop with data from a struct ?
T = {ECG.event.type}; % comma-separated list L = [ECG.event.latency]; % ditto xAB = strcmp(T(1:end-1),'A') & strcmp(T(2:end),'...

4일 전 | 0

| 수락됨

답변 있음
How to store data when a string condition of another column is met?
T = readtable('SED_FULL_NE.xlsx') [G,YEAR,STATE_ABBR] = findgroups(year(T.BEGIN_DATE),T.STATE_ABBR); COUNT = accumarray(G,ones...

5일 전 | 0

| 수락됨

답변 있음
find ( strcmp ( many_different_elements )
"But was wondering if there's a nicer way than to write 90 times in the find line" Of course: forget about repeated STRCMP call...

6일 전 | 0

답변 있음
Compare two Vectors and multiply equal entries
ID = 'ABCDEF'; val = 1:6; arr = 'AABBCDDDEFFE'; [X,Y] = ismember(arr,ID); out = val(Y(X))

7일 전 | 0

| 수락됨

답변 있음
Convert a cell array into arrays
Where C is your cell array: M = vertcat(C{:,4}) or M = cell2mat(C(:,4))

7일 전 | 1

| 수락됨

답변 있음
A function that counts the number of zeros in a vector
D = [1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0]; nnz(D==0)

8일 전 | 1

답변 있음
Get the position of the next in row and next in column in a matrix
A reasonably simple, efficient, robust approach: A = [1,0,-2,0,0;2,8,0,1,0;0,0,3,0,-2;0,-3,2,0,0;1,2,0,0,-4] [C,R] = find(A.')...

8일 전 | 1

답변 있음
How can I use a floating point number with input command?
L = 10; S = sprintf('Enter the location of the force (0 - %0.2f meters): ',L); a = input(S);

9일 전 | 0

| 수락됨

답변 있음
Plotting ode 45 results
clear all % <- get rid of this. It seems that the main purpose of CLEAR ALL is to introduce bugs into beginners' code when they...

12일 전 | 0

답변 있음
Removing a character from a table (that's within a struct)
As far as I understand, you want to convert one column/variable of the table from cell array of character vectors to numeric. Th...

13일 전 | 1

| 수락됨

답변 있음
How to save images on a new folder created automaticaly and named after a video.
"For example : mkdir vid.Path vid.Name. This should create a new folder named after the video`s name right ? " No it won't, bec...

14일 전 | 2

| 수락됨

답변 있음
How to use a function with array output for each value in a different array?
"Ideally, I would want a matrix with each day's zenith angles on each row of the matrix." That is easy, just make sure that DEL...

14일 전 | 0

| 수락됨

답변 있음
Compare 2 strings without using ismember or strcmp
Presuming that your examples with invalid syntax are actually supposed to be string arrays: a = ["qwert34776";"dnfien/8863";"fe...

23일 전 | 0

| 수락됨

답변 있음
Reducing number of elements.
V = rand(100,1) Z = mean(reshape(V,10,10),1).'

23일 전 | 0

답변 있음
How can I add n columns to a matrix?
A simpler, more versatile, and much more efficient approach is to use ZEROS: R = size(X,1); C = number_of_new_columns; X = [...

24일 전 | 1

| 수락됨

답변 있음
I want to increase my cell's length by 8 times, by making each and every element copying by 8 times.
C = {'cat','dog'}; D = repelem(C,8)

24일 전 | 0

| 수락됨

답변 있음
How to use interp1 command?
Numbering your variables like that is a red-herring that makes this task more complex. MATLAB is designed to work efficiently w...

24일 전 | 0

| 수락됨

답변 있음
I am attempting to change the value 'K' to a value of 10 so I can add it to other numbers.
Putting meta-data (e.g. the suits, card types) into variable names makes this task much harder. Meta-data is data and should be...

24일 전 | 1

| 수락됨

답변 있음
Dimensions of arrays being concatenated are not consistent.
The problem is the line-break without any ellipses. But your code can be simplified anyway, removing that problem: x = [ConcVal...

24일 전 | 0

| 수락됨

답변 있음
How to subtract coloumn vectors of a cell array
inp = load('mycell.mat').mycell; % input data fun = @(m) 1+diff(m,1,2); % anonymous function out = cellfun(fun,inp, 'uni',0) %...

24일 전 | 0

답변 있음
How to publish html in matlabcentral?
This can be done when you upload a submission to File Exchange (aka. FEX). You will need to: publish your M-file to HTML using ...

25일 전 | 0

| 수락됨

답변 있음
How to accumulate values ​​from time 1 to the last time
P = 'absolute or relative path to where the files are saved'; S = dir(fullfile(P, '*.txt')); % Select the file extension to su...

25일 전 | 0

답변 있음
Split a cell array of character vectors at multiple-number delimiter
Rather than telling us what you currently get, it is probably more useful if you tell us what you want. I made some guesses abo...

26일 전 | 1

| 수락됨

답변 있음
Reading mixed format data containing both text and numbers from a '.txt' file in matlab
fpt = '.'; % absolute or relative path to where the file is saved. fnm = fullfile(fpt,'text.txt'); % Count the header lines: ...

26일 전 | 1

답변 있음
Determining Order of flattening an array using colons
"If we use A(:,:) we expect an array with dimensions (X*Y, Z), with the i,j element pointing at (i mod X, i div Y, j) element o...

27일 전 | 1

| 수락됨

답변 있음
Saving file at different directory
You need to use FULLFILE to include the path in the filename, e.g.: [F,P] = uiputfile('FileNAME.txt'); fnm = fullfile(P,F); % ...

28일 전 | 1

| 수락됨

더로드