Community Profile

photo

Kevin Phung


173 2018 年以降の合計貢献数

連絡する

Kevin Phung's バッジ

  • 3 Month Streak
  • Thankful Level 1
  • Knowledgeable Level 3
  • First Answer

詳細を表示...

貢献した分野
表示方法

回答済み
Find all lines of a matrix which have a matching pair of values
A = [1 2 3 4; 2 5 7 8; 4 5 7 9; 4 6 7 13; 6 8 13 15]; Pairs = [5 7; 4 7; 6 13]; index =zeros(size(Pairs,1),1); for i = 1:size...

20日 前 | 0

回答済み
compare the elements of multiple matrix and return min and max matrix
A = [1 92 33; 4 15 66; 16 27 48]; B = [34 45 16; 67 38 19; 2 83 31]; C = [20 53 61; ...

20日 前 | 1

回答済み
How to sum up multiple vectors, element by element, to recieve one final value?
example: W = [1 2 3 4 5]; O = [1 2 3 4 5]; %do the numerator first: E = W.*O; %element wise product %sum up the produ...

20日 前 | 1

| 採用済み

回答済み
Array Operation with using another array
sum(k(m))

20日 前 | 0

| 採用済み

質問


How to Re-position DataCursormode 'Window'
So Matlab figures have a datacursormode that either show up as a datatip or a window. I would like to make use of the window bu...

25日 前 | 1 件の回答 | 0

1

回答

回答済み
Count number of elements in a matrix more or less than given numbers
x = 10; y = 20; sum(A(:,2)<x | A(:,2)>y)

約1ヶ月 前 | 1

| 採用済み

回答済み
Replace largest elements in matrix with NaN
A =[17 2 5 68 79 28 900 17 77 63 90 87]; n = 3; elem = sort(A(:,1),'d'); elem =...

約1ヶ月 前 | 1

| 採用済み

回答済み
Plot using same colors
To plot in a specific color, scroll down in : https://www.mathworks.com/help/matlab/ref/plot.html so you can do something like...

約1ヶ月 前 | 0

回答済み
Find if max elements in array < or > a given number
a = [6 7 4 8 9]; val = numel(a); if sum(a >= val) > val/2 disp(['Max elements greater than or equal to: ' num2str(val)]);...

約1ヶ月 前 | 1

| 採用済み

回答済み
What's the best way to shorten this?
a for loop! https://www.mathworks.com/help/matlab/ref/for.html

約1ヶ月 前 | 1

回答済み
How to use windowkeypressfcn
function keyP(source, event) KeyPressed=event.Key; if strcmp(KeyPressed,'escape') view(3) end end It's as the error ...

約1ヶ月 前 | 0

回答済み
Why won't this program run?
STEPS = 100; tau = 10; t0 = 2*tau; dt = 1; t = [0:STEPS-1]*dt; gE = zeros(1,STEPS); for i = 1:STEPS a = dt*ST...

約1ヶ月 前 | 0

| 採用済み

回答済み
How to get a single value of an array through a function inside a script?
function Eg = Esrc(u,a) a = dt*u; %% I want to use the a that is defined above in the code. fo...

約1ヶ月 前 | 0

| 採用済み

質問


How to find installation folder for matlab add-ons via command line?
Hi, I have a gui (made through a class method, in a class folder) that on start up checks whether or not the user has a specific...

約2ヶ月 前 | 0 件の回答 | 1

0

回答

回答済み
Updating variable matrix values to static boxes in GUI !
make sure your function main_file_run() actually has an output, so in that function: function x = main_file_run() % blah blah...

約2ヶ月 前 | 0

回答済み
Using a while loop with a vector
Your while loop actually only runs once because after the first iteration, B>360 returns a logical array of [0 0 0 1 1 1], so it...

約2ヶ月 前 | 0

| 採用済み

質問


How would these functions behave after compiling from GUI -> Executable?
I have designed a matlab gui (not with guide or appdesigner) and am interested in eventually compiling it into an executable fil...

約2ヶ月 前 | 0 件の回答 | 0

0

回答

回答済み
animate for a given time
tic toc is used to see how long processes take in your script. This is not relevant to what you are trying to do. You should ta...

約2ヶ月 前 | 0

回答済み
index in matrix using loop
m = [0.5 0.5; 0.25 0.5; -0.5 -0.5] % your sample matrix f = m(m>0) * A + fill c = m(m<0) *A + cut ^ this only return the va...

約2ヶ月 前 | 0

回答済み
I am having problems in anonymous function (y=@(x)(...))
let me know if this is what youre trying to do with your anon functions: function y = fun(a,x) y = sum(triu(repmat(flip(x.^(1...

約2ヶ月 前 | 0

回答済み
Plot is not working
Your T is a vector, and your Y is a scalar. There is no singular line because it is actually plotting all 5 points as individual...

2ヶ月 前 | 0

| 採用済み

回答済み
why nothing is happening when i am calling other function in other button?
what is supposed to be happening? My guess is that something IS happening, except your callback functions are not returning anyt...

2ヶ月 前 | 0

回答済み
GUI Ignoring Changes to figure.Pointer Without a pause() command
add in a drawnow() command after you change the cursor.

2ヶ月 前 | 0

| 採用済み

回答済み
Calling function with set parameters
You can put all those graphic objects into an array, same for the strings and other parameters. then use a forloop. short examp...

3ヶ月 前 | 0

| 採用済み

回答済み
Filtering matlab table like a database or via dropdown menu
Yes! I would suggest creating the gui through uicontrol() programmatically (not via GUIDE): https://www.mathworks.com/help/matl...

3ヶ月 前 | 0

| 採用済み

回答済み
Photo and Text with Dropdown Menu
use uicontrol to create a text box: https://www.mathworks.com/help/matlab/ref/uicontrol.html and imshow to create your image: ...

3ヶ月 前 | 0

回答済み
How do I create a call back function that updates a "Label" when I push a button? (Calculator)
assign a tag to your label, which I assume is a text graphic object. example: txt1.Tag = 'label1'; function button_1callbac...

3ヶ月 前 | 1

回答済み
How can I share data from a uitable into the workspace of a timer function that reruns periodically?
sounds like maybe the handle for your uitable is out of the scope of the function. Etiher pass it as an input, or assign a tag t...

3ヶ月 前 | 1

| 採用済み

回答済み
How do I fit my data to a cos^2?
All I used was the plot function and I got something pretty sinusoidal theta = [90, 110, 130, 135, 150, 170, 180, 190, 210, 225...

3ヶ月 前 | 0

回答済み
Error using reshape and permute
a 17*11*11 matrix contains 2057 elements, you have 1800.

3ヶ月 前 | 0

| 採用済み

Load more