질문


Remove parentheses with regexp
I have the following string: a ='0.00 (578)'; How can I use regexp to retrieve what is inside the parentheses? I have ...

대략 12년 전 | 답변 수: 1 | 0

1

답변

질문


Use Java Classes in Matlab
I have created a small Java CelsiusConverter GUI as described in <http://docs.oracle.com/javase/tutorial/uiswing/learn/creating...

12년 초과 전 | 답변 수: 0 | 0

0

답변

질문


Losing frames when "getdata"
In a simple user interface I want to include a capture the image from my camera. To do this I have two push button. A start butt...

12년 초과 전 | 답변 수: 1 | 0

1

답변

질문


Timer error: Cannot start timer because it is already running.
I am trying to implement a simple timer in a GUI. It is just a figure with two buttons. I want when I press the start button to ...

12년 초과 전 | 답변 수: 1 | 0

1

답변

질문


Overlay an image in preview video
I would like to overlay an image when I preview video. By trying this : vid = videoinput('winvideo'); preview(vid) ...

12년 초과 전 | 답변 수: 2 | 0

2

답변

질문


Regexp: different behavior for the same type of expressions
I want to capture everything except the tokens: |name|, |'_'| and |'.iv2'| name = A7122 >> filename' ...

12년 초과 전 | 답변 수: 2 | 0

2

답변

질문


Getting the output from a callback in main function
I have the following simple problem. I have created a gui and I would like to get the output of the callback function in main fu...

12년 초과 전 | 답변 수: 2 | 0

2

답변

질문


Optionally create plots inside function
I have a function y=myfun(x) y=3*x; plot(x, y) If |x=[1 2 3 4 5];| then the plot will be plotted. Is there anyway...

12년 초과 전 | 답변 수: 1 | 0

1

답변

질문


Trapz abnormal behavior. Error:Subscript indices must either be real positive integers or logicals.
When I enter: >> trapz(2,2) ans = 0 When I enter: >> trapz(2.2,2.2) Subscript indices ...

12년 초과 전 | 답변 수: 2 | 0

2

답변

답변 있음
Find cases of vectors-patterns in an array
I had also this in my mind as a backup idx= [0; diff(t1'==-1)]==-1 | [diff(t1'==-1); 0]==1; a=reshape(t1(idx),2,[]) ...

12년 초과 전 | 0

질문


Find cases of vectors-patterns in an array
I have 4 cases of vectors inside an array that I want to index. All of them have trailing -1. I would like to index such pattern...

12년 초과 전 | 답변 수: 2 | 0

2

답변

문제를 풀었습니다


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

12년 초과 전

문제를 풀었습니다


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

12년 초과 전

문제를 풀었습니다


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

12년 초과 전

문제를 풀었습니다


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

12년 초과 전

문제를 풀었습니다


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

12년 초과 전

문제를 풀었습니다


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

12년 초과 전

문제를 풀었습니다


Is my wife right?
Regardless of input, output the string 'yes'.

12년 초과 전

문제를 풀었습니다


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

12년 초과 전

문제를 풀었습니다


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

12년 초과 전

문제를 풀었습니다


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

12년 초과 전

문제를 풀었습니다


Add two numbers
Given a and b, return the sum a+b in c.

12년 초과 전

문제를 풀었습니다


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

12년 초과 전

문제를 풀었습니다


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

12년 초과 전

문제를 풀었습니다


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

12년 초과 전

질문


In a logical array index the area with the most TRUE values
Below I have a logical vector: t=[0 1 0 0 0 0 1 1 0 0 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 1 0]; which has 5 TRUE areas and 6...

12년 초과 전 | 답변 수: 2 | 0

2

답변

질문


Printing to screen with fprintf. Reclaim back the printed result after clearing the screen.
Suppose I use the fprintf as follows: name='John'; height=1.8; age=27; fprintf('Name.............%s\n\n', na...

12년 초과 전 | 답변 수: 1 | 0

1

답변

답변 있음
A line at maximum value of y ?
line(get(gca,'Xlim'), [max(y) max(y)],'color', 'red')

12년 초과 전 | 1

| 수락됨

질문


In a logical array find how the density of TRUE values increases
Supposedly we have a logical array: t=[1 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0]; The...

12년 초과 전 | 답변 수: 4 | 1

4

답변

질문


Error when running inbuild example of Simulink (R2013a) Supercapacitor Model
I am using Matlab version (R2013a). The simulink of this version contains an example with the name Supercapacitor Model. When I...

12년 초과 전 | 답변 수: 1 | 0

1

답변

더 보기