문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


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 ...

10년 초과 전

문제를 풀었습니다


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...

10년 초과 전

문제를 풀었습니다


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...

10년 초과 전

문제를 풀었습니다


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 ...

10년 초과 전

문제를 풀었습니다


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...

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


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:...

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


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 ...

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


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...

10년 초과 전

답변 있음
fitting a logarithmic data
since you are tring to do a nonlinear regression why don't you use nlinfit? ownFunc = @(A,x) A(1)*exp(-A(2)/x)+A(3)*exp...

거의 11년 전 | 0

답변 있음
Write a Matlab script that asks for an integer (n) and then computes the following based on the value of the integer:
prompt = 'Give an integer value? '; n = input(prompt); % check if integer number is provided if ~(abs(round(n)-n) < e...

거의 11년 전 | 1

답변 있음
Error for textscan command
s=textscan(fid,'%f%f%f'); worked on the data you provided

거의 11년 전 | 2

답변 있음
How can you rearrenge a large datafile to....
instead of using load, you could use textscan to read in the txt file endNotReached = true; counter = 1; fid = fope...

거의 11년 전 | 1

| 수락됨

답변 있음
Is this a bug on the zero power of matrix?
I think this answer is correct since _If exponentiation means repeated multiplication, then A^0=I is the base case for all A._ ...

거의 11년 전 | 0

답변 있음
How to get a push button to end a loop in a GUI?
you need to set a flag when you press the pusbutton to stop so in your pushbutton4 callback you should put this instead of the c...

거의 11년 전 | 1

| 수락됨

답변 있음
Manually adding plots and legends with a Button Press
if I understand your question correctly this should work, since you need to be placing brackets around each legend entry for mat...

거의 11년 전 | 1

답변 있음
How to read only first/last column from a .dat file to make faster the code
why don't you use textscan? See code below. Couldn't test if it is faster or not since the data is not attached fid = fopen...

거의 11년 전 | 0

답변 있음
Rearranging filenames with extension .number (Ordering)
if all your filenames have the same length (which seem to be the case for the file in attachment) you could do this fin = c...

거의 11년 전 | 0

답변 있음
how to remove the some ploted node and assisgn the new location in the 2d graph
you need to use a handle when plotting the node plotHandle(i) = plot(X(i),Y(i)); Then later you can use deleta(pl...

거의 11년 전 | 0

답변 있음
Finding if numbers are within range
I do not think you need to use a for loop for this problem, instead using a vectorized solution is much faster and easier to rea...

거의 11년 전 | 0

답변 있음
Matlab: Read more data from a single column file
you can just use textscan with %f format and 2 headerlines. This will read in the first vector and will stop as soon as it hits ...

거의 11년 전 | 0

답변 있음
Assign different strings in a cell array with a number
maybe you could try using unique on the cell array so that you know all possible names. Then you could assign numbers to these n...

거의 11년 전 | 0

| 수락됨

답변 있음
compare with a plot the distribution of my data to the extreme value (Gumbel) distribution
calling the help for ecdf this indicates that the function returns the empirical cumulative distribution function (cdf), f, eval...

거의 11년 전 | 0

답변 있음
How can I load and read data from excel file?
why doesn't xlsread work? If interested in more functionality you could also use the actxserver to open the excel applicati...

거의 11년 전 | 0

답변 있음
Saving an image in matlab with same dimension (250 x 250)
do you know this submission on the matlab file exchange http://www.mathworks.com/matlabcentral/fileexchange/23629-export-fig ...

거의 11년 전 | 0

답변 있음
Value not multiplying by -1
in a for loop there is no need to increment the _i_ so just leave out i = i+1 as this is done automatically. Also ...

거의 11년 전 | 1

답변 있음
For loop Issue, Loops, Row Col Indexing Issue
This does not seem to be a problem with the for-loop. Are you sure that the SVMM model is correct and that it gives as output 'Y...

거의 11년 전 | 0

더 보기