Binbin Qi
China University of Petroleum
Followers: 0 Following: 0
Professional Interests: Machine Learning/ Math/ Geophysics
Feeds
답변 있음
Equivalent of c++'s NULL or python' s None in MATLAB
I think you can use class.empty for null in matlab classdef A < handle properties empty = A.empty; end end...
Equivalent of c++'s NULL or python' s None in MATLAB
I think you can use class.empty for null in matlab classdef A < handle properties empty = A.empty; end end...
2년 초과 전 | 0
답변 있음
Finding the number of rows to the next row containing a 1
A = [0 0 0 1 0 1 1 1 0 0 0 0 0 1]'; C = find(A); D = (1:length(A)) - C; D(D>0) = D(D>0) + inf'; min(abs(D))' ans = ...
Finding the number of rows to the next row containing a 1
A = [0 0 0 1 0 1 1 1 0 0 0 0 0 1]'; C = find(A); D = (1:length(A)) - C; D(D>0) = D(D>0) + inf'; min(abs(D))' ans = ...
3년 초과 전 | 2
답변 있음
Create Incidence matrix from Graph theory?
ok >> G=digraph( [ 1 2 2 2 3 4] , [4 1 3 4 1 3]); >> I = full(incidence(G)) I = -1 1 0 0 1 0 ...
Create Incidence matrix from Graph theory?
ok >> G=digraph( [ 1 2 2 2 3 4] , [4 1 3 4 1 3]); >> I = full(incidence(G)) I = -1 1 0 0 1 0 ...
3년 초과 전 | 1
| 수락됨
답변 있음
Create Incidence matrix from Graph theory?
>> G=digraph( [ 1 2 2 2 3 4] , [4 1 3 4 1 3]); >> full(G.adjacency) ans = 0 0 0 1 1 0 1 ...
Create Incidence matrix from Graph theory?
>> G=digraph( [ 1 2 2 2 3 4] , [4 1 3 4 1 3]); >> full(G.adjacency) ans = 0 0 0 1 1 0 1 ...
3년 초과 전 | 0
답변 있음
Change date format in vector
t1 = datetime("4/1/2019 12:45:00 AM",'InputFormat',"dd/MM/yyyy HH:mm:ss a"); t2 = datetime("15/6/19 18:10",'InputFormat',"dd/M...
Change date format in vector
t1 = datetime("4/1/2019 12:45:00 AM",'InputFormat',"dd/MM/yyyy HH:mm:ss a"); t2 = datetime("15/6/19 18:10",'InputFormat',"dd/M...
3년 초과 전 | 0
| 수락됨
답변 있음
For loop and if else statements with multiple conditions
clear;clc;close all [m, n] = deal(4, 8); matrix_data = rand(m, n); num = ['1st','2nd','3rd', sprintfc('%dth', 4:8)]; for i =...
For loop and if else statements with multiple conditions
clear;clc;close all [m, n] = deal(4, 8); matrix_data = rand(m, n); num = ['1st','2nd','3rd', sprintfc('%dth', 4:8)]; for i =...
3년 초과 전 | 1
| 수락됨
답변 있음
How to get specific values from matrix in column 1, based on values in other columns?
clear;clc;close all load sub-01_T2_planktimes R = accumarray(sub01T2(:,2:3)+1,sub01T2(:,1),[], @(x){x}); R{2,2} ans = ...
How to get specific values from matrix in column 1, based on values in other columns?
clear;clc;close all load sub-01_T2_planktimes R = accumarray(sub01T2(:,2:3)+1,sub01T2(:,1),[], @(x){x}); R{2,2} ans = ...
3년 초과 전 | 0
답변 있음
Dialog UI and sprintf creating unnecessary new lines
The following is my code. It is can work normally. Can you give your code here? function mydialog(line1,line2,line3) if narg...
Dialog UI and sprintf creating unnecessary new lines
The following is my code. It is can work normally. Can you give your code here? function mydialog(line1,line2,line3) if narg...
3년 초과 전 | 0
답변 있음
How to genneral a repeat array
You can use repelem function to accomplish your question a = 1 2 3 4 >> repelem(a, 3) ...
How to genneral a repeat array
You can use repelem function to accomplish your question a = 1 2 3 4 >> repelem(a, 3) ...
7년 초과 전 | 0
| 수락됨
답변 있음
How do I convert my .mlapp file into a .exe file?
you can get the main file and use deploytool command
How do I convert my .mlapp file into a .exe file?
you can get the main file and use deploytool command
7년 초과 전 | 0
답변 있음
change font size of subplot text
I use the following code, it can work clear;clc;close all subplot(335); fplot(@sin,[-1,1]); tx = text(.5,.5,'y = s...
change font size of subplot text
I use the following code, it can work clear;clc;close all subplot(335); fplot(@sin,[-1,1]); tx = text(.5,.5,'y = s...
거의 8년 전 | 0
답변 있음
Area between two curves
if you can get the points of every curve, you can use *polyarea* function to get the area, and then diff
Area between two curves
if you can get the points of every curve, you can use *polyarea* function to get the area, and then diff
대략 9년 전 | 0
답변 있음
why slow 5 times when tic or toc and expression in one line?
Thank you, I guess the reason is JIT.Now, I confirmed
why slow 5 times when tic or toc and expression in one line?
Thank you, I guess the reason is JIT.Now, I confirmed
대략 9년 전 | 0
질문
why slow 5 times when tic or toc and expression in one line?
when tic or toc and the main expression are in one line, it will be slow *5 times* than not in a line *1: tic or toc and the ...
대략 9년 전 | 답변 수: 2 | 0
2
답변질문
How to get the same rand
recently,I do cody games,and I am in trouble about the problem 207:hackathon impossible the link is: http://www.mathworks.cn/ma...
거의 12년 전 | 답변 수: 1 | 0