Spencer Chen
Followers: 0 Following: 0
Feeds
질문
Inadvertently activating disabled axes interactions
Hi, I have a problem with plots where I have disabled axtoolbar and default interactions. I have customized mouse click callback...
대략 3년 전 | 답변 수: 0 | 0
0
답변질문
Using LimitsChangedFcn to sync axes of different x-scales
Trying out the newly added LimitsChangedFcn callback in the XAxis of Axes objects in R2021a. I'm running into callback re-entry ...
3년 초과 전 | 답변 수: 1 | 2
1
답변질문
Programmatically change UDP Packet Output IP: Desktop Real-Time
Hi, I have a Simulink desktop real-time model that has a Packet Output set up to do UDP. I want to be able to set it up so it i...
4년 초과 전 | 답변 수: 0 | 1
0
답변답변 있음
Row combination for repeated values
Now, you were not very clear on your column structure. I understand it as in: A = [date.depth1, date.depth2 .. date.depthNtime,...
Row combination for repeated values
Now, you were not very clear on your column structure. I understand it as in: A = [date.depth1, date.depth2 .. date.depthNtime,...
거의 5년 전 | 1
답변 있음
How to generate random matrix of 0 and 1 of distinct rows?
I don't know if there are any. But it's easy to write one for your specific case where you only have 5 columns. That is quite m...
How to generate random matrix of 0 and 1 of distinct rows?
I don't know if there are any. But it's easy to write one for your specific case where you only have 5 columns. That is quite m...
거의 5년 전 | 0
| 수락됨
답변 있음
Linking pushbuttons to a callback function
I think the problem may lie in that you have nested your functions such that selectionChanged() is a nested function of AND1(). ...
Linking pushbuttons to a callback function
I think the problem may lie in that you have nested your functions such that selectionChanged() is a nested function of AND1(). ...
거의 5년 전 | 0
답변 있음
R2015a plot problem with ticklabel definition
Well, you have set you ytick labels to: num2str(y2(:), '%0.1f') Maybe you meant? num2str(linspace(-0.8,0.8,5), '%0.1f') Bles...
R2015a plot problem with ticklabel definition
Well, you have set you ytick labels to: num2str(y2(:), '%0.1f') Maybe you meant? num2str(linspace(-0.8,0.8,5), '%0.1f') Bles...
거의 5년 전 | 0
답변 있음
Problem while creating a gui and to share variables via assignin
What do you mean by "pass them to other functions"? Do you mean access of variable_1 by plotButtonPushed()? When you set the ca...
Problem while creating a gui and to share variables via assignin
What do you mean by "pass them to other functions"? Do you mean access of variable_1 by plotButtonPushed()? When you set the ca...
거의 5년 전 | 0
| 수락됨
답변 있음
Saving values from a for loop into an existing matrix
This might be your problem: for i = num_nd ... This code does not give you a proper for-loop. I'll leave you pondering on the...
Saving values from a for loop into an existing matrix
This might be your problem: for i = num_nd ... This code does not give you a proper for-loop. I'll leave you pondering on the...
거의 5년 전 | 0
답변 있음
How to generate all possible combinations of audio files?
If you have to use nchoose(), then something like this would work: combinations = nchoosek(SoundNames, 2); for i = 1:size(comb...
How to generate all possible combinations of audio files?
If you have to use nchoose(), then something like this would work: combinations = nchoosek(SoundNames, 2); for i = 1:size(comb...
거의 5년 전 | 0
| 수락됨
답변 있음
How can assign a color channel to an image series?
1) What you want to achieve get is probably something like this: RGBimage=cat(3,grayimage,zeros(size(grayimage),'uint16'),zeros...
How can assign a color channel to an image series?
1) What you want to achieve get is probably something like this: RGBimage=cat(3,grayimage,zeros(size(grayimage),'uint16'),zeros...
거의 5년 전 | 0
답변 있음
How to extract multiple number data after the same specific string from a .txt file?
Something like this should get you started: txt = fileread('test.txt'); txt = splitlines(txt); for ii = 1:numel(txt) if st...
How to extract multiple number data after the same specific string from a .txt file?
Something like this should get you started: txt = fileread('test.txt'); txt = splitlines(txt); for ii = 1:numel(txt) if st...
거의 5년 전 | 0
| 수락됨
답변 있음
Taking in 2 array variables, my output variable is a single number rather than an array. Any suggestions to get my output in an array?
I guess you probably want to use the: A ./ B operation instead of the straight divide "/". Also as a recommendation, break ...
Taking in 2 array variables, my output variable is a single number rather than an array. Any suggestions to get my output in an array?
I guess you probably want to use the: A ./ B operation instead of the straight divide "/". Also as a recommendation, break ...
거의 5년 전 | 0
답변 있음
Rename a variable within global (function in function)
Simply assign it to another variable. global evil_global_var; saved_evil_global_val = evil_global_var; evil_global_var = new_...
Rename a variable within global (function in function)
Simply assign it to another variable. global evil_global_var; saved_evil_global_val = evil_global_var; evil_global_var = new_...
거의 5년 전 | 0
| 수락됨
답변 있음
How to get rid of the 1/f in EEG data?
polyfit() is not for estimating 1/f functions. Something like this is more appopriate: fout = fit(x,y,'(a/x)^b','Lower',[0 0])...
How to get rid of the 1/f in EEG data?
polyfit() is not for estimating 1/f functions. Something like this is more appopriate: fout = fit(x,y,'(a/x)^b','Lower',[0 0])...
거의 5년 전 | 0
답변 있음
optimizing my code using vectorization methods or avoiding for loops
I would first use the "profile" function to check which part of the code is actually taking a long time. Then tackle those lines...
optimizing my code using vectorization methods or avoiding for loops
I would first use the "profile" function to check which part of the code is actually taking a long time. Then tackle those lines...
거의 5년 전 | 0
| 수락됨
답변 있음
how can i solve this problem?
Maybe this will get you started. You already have in your code an example of a for-loop. To put Np into a loop, you can construc...
how can i solve this problem?
Maybe this will get you started. You already have in your code an example of a for-loop. To put Np into a loop, you can construc...
거의 5년 전 | 0
답변 있음
How to find conditional unique value in matrix
Maybe this will get you started: ux1 = unique(x(:,1)); % Find your unique order numbers for xx = 1:numel(ux1) idx = x(:...
How to find conditional unique value in matrix
Maybe this will get you started: ux1 = unique(x(:,1)); % Find your unique order numbers for xx = 1:numel(ux1) idx = x(:...
거의 5년 전 | 0
답변 있음
How to find the Y Value in a Array and Locate corresponding X Value
You are on the right track. Let's start with: X=find(x1(i)~=x4(i)); Indexing into x1 and x4 is your problem here. Think abou...
How to find the Y Value in a Array and Locate corresponding X Value
You are on the right track. Let's start with: X=find(x1(i)~=x4(i)); Indexing into x1 and x4 is your problem here. Think abou...
거의 5년 전 | 0
답변 있음
Adi is set to 0 when i = 1
Not sure what you are trying to do with Adi. If you solve the mathematical formula: Adi = ((Vd + 1)-(Vd - 1)/(2*(.1)); Adi = (...
Adi is set to 0 when i = 1
Not sure what you are trying to do with Adi. If you solve the mathematical formula: Adi = ((Vd + 1)-(Vd - 1)/(2*(.1)); Adi = (...
거의 5년 전 | 0
답변 있음
Force nansum to equal NaN (and not 0)
Try: returnMarket(all(isnan(omega)&isnan(retSize1Value1),2)) = NaN; You need to run all() on dimension 2 instead of dimension ...
Force nansum to equal NaN (and not 0)
Try: returnMarket(all(isnan(omega)&isnan(retSize1Value1),2)) = NaN; You need to run all() on dimension 2 instead of dimension ...
거의 5년 전 | 0
| 수락됨
답변 있음
Why do i keep getting this error???
It's hard to determine the exact problem with the information you have provided. It would be much better if you had copy and pas...
Why do i keep getting this error???
It's hard to determine the exact problem with the information you have provided. It would be much better if you had copy and pas...
거의 5년 전 | 0
답변 있음
Colormap: ColorScale options other than linear and log (power norm, etc)
I do not think there is native Matlab feature to do that. You can convert your data into your desired log function and plot it o...
Colormap: ColorScale options other than linear and log (power norm, etc)
I do not think there is native Matlab feature to do that. You can convert your data into your desired log function and plot it o...
거의 5년 전 | 0
답변 있음
create a matrix from matrix with zeros elements
You can create a new matrix of the same size: B = zeros(size(A)); Then assign non-zero data in B. Blessings, Spencer
create a matrix from matrix with zeros elements
You can create a new matrix of the same size: B = zeros(size(A)); Then assign non-zero data in B. Blessings, Spencer
거의 5년 전 | 0
답변 있음
Issues with polynomial fit
You are fitting an order-1 polynomial, i.e. linear, so it is a bad fit. Try higher orders. But it looks like a different functio...
Issues with polynomial fit
You are fitting an order-1 polynomial, i.e. linear, so it is a bad fit. Try higher orders. But it looks like a different functio...
거의 5년 전 | 0
| 수락됨
답변 있음
set Precision in lsqcurvefit
Check out: doc optimoptions I think something like OptimalityTolerance is what you are looking for. Blessings, Spencer
set Precision in lsqcurvefit
Check out: doc optimoptions I think something like OptimalityTolerance is what you are looking for. Blessings, Spencer
거의 5년 전 | 0
답변 있음
Data type conversion help
First of all, assuming that your Rpt_row_sel is a table, then Rpt_row_sel(:,2) will also output a table, which cannot be compare...
Data type conversion help
First of all, assuming that your Rpt_row_sel is a table, then Rpt_row_sel(:,2) will also output a table, which cannot be compare...
거의 5년 전 | 0
답변 있음
Write cell data to excel or text file in a specific format
I'm afraid that you are not clear enough for me regarding the original format of the data, so I can only guess. If you just wan...
Write cell data to excel or text file in a specific format
I'm afraid that you are not clear enough for me regarding the original format of the data, so I can only guess. If you just wan...
거의 5년 전 | 0
답변 있음
Plotting Points at Specified Index Values
Let's separate your problem into 2 parts: (1) Plotting problem. (2) Finding location of you Maximum on the xGrid2. I'll start w...
Plotting Points at Specified Index Values
Let's separate your problem into 2 parts: (1) Plotting problem. (2) Finding location of you Maximum on the xGrid2. I'll start w...
거의 5년 전 | 0
답변 있음
Index in position 1 exceeds array bounds (must not exceed 1)
Try instead: layl=scanvecs{l}; Note the curly brackets to extracting the content of the cell at the indexed position. Using r...
Index in position 1 exceeds array bounds (must not exceed 1)
Try instead: layl=scanvecs{l}; Note the curly brackets to extracting the content of the cell at the indexed position. Using r...
거의 5년 전 | 0
| 수락됨