Community Profile

# Stephen23

2014년부터 활동

Suspensa Vix Via Fit

All

배지 보기

#### Content Feed

보기 기준

답변 있음
input argument order in deep learning functions
"For those that have many input arguments, does the order of the input arguments affect the result of the function." In general...

2일 전 | 0

| 수락됨

답변 있음
For loop using Struct data with multiple values per timepoint
This would be a thousand times easier to answer if you had uploaded some sample data in the original format. Instead of actuall...

2일 전 | 0

| 수락됨

답변 있음
How can I create a loop to check each matrix element?
The MATLAB approach, without using loops and IFs like some low-level programming language: mxt = [ +90,+180,+200, +32, +99,+123...

3일 전 | 0

답변 있음
How to Open all of .mat file in one folder?
P = 'absolute or relative path to the folder where the files are saved'; S = dir(fullfile(P,'*.mat')); for k = 1:numel(S) ...

3일 전 | 1

| 수락됨

답변 있음
reading files of folders with specific name styles
P = 'absolute or relative path to where the folders are'; S = dir(fullfile(P,'Att*','*.*')); % specify the file extensions for...

4일 전 | 0

제출됨

Number to Scientific Prefix
Convert a numeric value to SI-prefixed text (aka engineering / metric prefix). Bonus: binary prefixes!

5일 전 | 다운로드 수: 8 |

제출됨

Scientific Prefix to Number
Convert SI-prefixed text (aka engineering / metric prefix) into numeric values. Bonus: binary prefixes!

5일 전 | 다운로드 수: 4 |

답변 있음
Summing Associated Values without Loop
A = [1,2;5,7;1,-1;3,5;5,2;1,7] [U,~,X] = unique(A(:,1),'stable'); V = accumarray(X,A(:,2)); M = [U,V] Or another approach: ...

6일 전 | 0

| 수락됨

답변 있음
Automatically load a struct from a struct with a variable name
"The path to the sub-struct should be generated automatically" Assuming that the MAT file contains exactly one variable (your s...

6일 전 | 0

| 수락됨

답변 있음
precision problem when creating a time vector
"But this should normally not be the case." What you show is the completely normal and expected behavior of binary floating poi...

6일 전 | 3

| 수락됨

답변 있음
Num2str without conversion character but with horizontal tab
"...a text file that looks like this:" channelname_1[tab]channelname_2[tab]...channelname_n[tab][newline] units_1[tab]units_2[...

6일 전 | 0

답변 있음
How to index a matrix to make it from a vector, taking some elements from the vector and put them in a new row?
A general approach: V = 43:56; N = 3; C = numel(V); M = V .* tril(triu(ones(C-N+1,C)),N-1); disp(M)

6일 전 | 0

답변 있음
Run a function inside a for loop 10,000 times and record the 3 separate outputs for each trial
Assuming that each output is a scalar double: N = 1e4; S = nan(1,N); M = nan(1,N); L = nan(1,N); for k = 1:N [S(k),M(k...

6일 전 | 0

답변 있음
Sorting a matrix based on another matrix
[driver_data,idx] = sortrows(driver_data,2); driver_names = driver_names(idx,:);

6일 전 | 0

| 수락됨

답변 있음
Why does my .csv file create spaces between each of my data points? It makes it to where I cannot graph precipitation against the date.

6일 전 | 0

| 수락됨

답변 있음
Replacing special character 'É' to 'E'
"Is there a Matlab function to replace the special characters (like 'É')" You can call Python from MATLAB, and it can do the he...

7일 전 | 0

답변 있음
i want to get string array corresponding another num array
Aold = ["a","b","c"]; Bold = [4,5,6]; Bnew = [6,4,5]; [X,Y] = ismember(Bnew,Bold); Anew = Aold(Y(X))

7일 전 | 0

| 수락됨

답변 있음
fprintf command reading my input matrix by column and displays incorrectly.
fprintf(fileID,'%10d %15d\n',COORD.'); % ^^ transpose "I can't find what I'm doing wrong onlin...

9일 전 | 0

답변 있음
Find a specific characters in a string
C = {'Arg', 'Asp', 'Cys', 'Glu','Lys','Tyr'}; T = 'MetArgGlyLeuAspTrpAspGlyAsn'; R = join(string(C),'|'); A = regexp(T,R,'mat...

10일 전 | 0

| 수락됨

답변 있음
I need to group certain hours of a day into day and night categories from my xlsx file in the format "yyyy-MM-dd'T'HH:mm:ss."
fnm = 'allship2018-2020_1_data_2.xlsx'; obj = detectImportOptions(fnm); obj = setvartype(obj,'BaseDateTime','datetime'); tbl ...

11일 전 | 0

답변 있음
Extracting the name of my cell array to use for figure titles
"Some guidance on a function I have overlooked ..." This one: https://www.mathworks.com/help/matlab/ref/inputname.html Using E...

12일 전 | 0

답변 있음
shift a block of rows to the end of a matrix
A = [0,0.2;0,0.1578;0,0.0721;0,0;0,0;0.2,0;0.3993,0;0.4,0;0.5428,0;0.6,0] N = find(all(A==0,2),1,'first'); B = circshift(A,-N,...

13일 전 | 0

| 수락됨

답변 있음
fprintf for multiple variables
a = 3; b = [2,3;1,5]; fprintf('The number: %d\nThe points: (%d,%d) (%d,%d)\n', a, b.');

13일 전 | 0

| 수락됨

답변 있음
What is the need for a nested function?
"I do not quite see the need for the 'function nma_project_511()'" There are two main ways to pass extra parameters to function...

13일 전 | 1

| 수락됨

답변 있음
How to convert excel date and time data into numerical integer matrix [year, month, day, hour, minute, second]
fnm = 'sample data.xlsx'; obj = detectImportOptions(fnm); obj = setvartype(obj,'date','datetime'); obj = setvartype(obj,'time...

13일 전 | 0

| 수락됨

답변 있음
Unrecognized variable, want to create a list of variable
The basic problem appears to be your attempt to re-define these parameters again inside every function, thus obliterating the in...

13일 전 | 1

| 수락됨

답변 있음
Avoid for loop in multi-dimensional problem
Some ideas: format compact A = cat(3,[0,-2*pi;2*pi,0],[0,-4*pi;4*pi,0]) % use CAT() A = pi*cat(3,[0,-2;2,0],[0,-4;-4,0]) % ta...

14일 전 | 0

| 수락됨

답변 있음
How do I stop random numbers from popping up when I run my code?
"Why are the 55's popping up?" Because you are storing all of the numeric data as character, which you then supply to FPRINTF a...

14일 전 | 1

| 수락됨

답변 있음
How to read files in ascending order based on the maximum value of the file from subfolders?
S = dir('**/table.txt'); for k = 1:numel(S) F = fullfile(S(k).folder, S(k).name); A = readmatrix(F); % do stuff ...

15일 전 | 1

| 수락됨

답변 있음
How to use string as plot arguments
"It just wont't allow me to use the string as shortcut." Ugh, that is a really very ugly way to code. Why not just use a much n...

17일 전 | 3

| 수락됨