답변 있음
saving values without index
Why do you not want to use an index? It is less efficient to just append values to an existing array, but you can: x = [];...

거의 14년 전 | 0

답변 있음
create random data
One of the benefits of using MATLAB is that you can use it interactively to try these things out and see if they do what you wan...

거의 14년 전 | 0

문제를 풀었습니다


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

거의 14년 전

답변 있음
Problem with ODE solver
Your equation is defining dy/dx = ay, not dy/dx = ax. Big difference! The solution to the former is y(x) = C*exp(ax); the solu...

거의 14년 전 | 0

답변 있음
What do you think of Cody, new service for MATLAB Central
OK, so you know that I'm biased, but let me be clear that I'm stating my personal opinion here, not that of my corporate overlor...

거의 14년 전 | 2

답변 있음
Plotting problem
You *are* plotting only the real parts. I think the problem is coming with how you're calculating these functions. You have |b...

거의 14년 전 | 0

| 수락됨

답변 있음
Could someone please explain...
|r_dat| is a function with no input arguments: function F = r_dat but you're calling it with an input F = r_dat(dat...

거의 14년 전 | 0

| 수락됨

답변 있음
why can I not create 3 subplots?
|subplot| deletes any axes that are already where you're trying to put the new one. If you're going to set the |position| prope...

거의 14년 전 | 3

| 수락됨

답변 있음
Need some clarification
Just from looking at the code, it looks as though you're dividing a scalar by a column vector: y = data(:,1); ... ......

거의 14년 전 | 0

| 수락됨

답변 있음
Please help me convert equation to matlab code.
Assuming that |x| is a column vector N = length(x); k = 0:(N-1); DCTbasis = cos(k'*(2*k+1)*pi/(2*N)); w = sqrt(2/N)*DCTb...

대략 14년 전 | 0

답변 있음
varargin
It is used for situations where you want to allow any number of input arguments (so you can't list them). A common reason for t...

대략 14년 전 | 13

답변 있음
How do you label the rows and columns of an array?
MATLAB doesn't have a way to tag meta data onto an array. There are, however, several ways to do something like you've asked, b...

대략 14년 전 | 0

답변 있음
Interpolate to find values at particular points from a 45x28 matrix
Sounds like a job for |TriScatteredInterp|! F = TriScatteredInterp(X,Y,P); p = F(x,y); Are |X| and |Y| matrices (same...

대략 14년 전 | 0

답변 있음
Possible to create a function where the input is changed?
I am not doing this... classdef passbyref < handle properties value end met...

대략 14년 전 | 1

답변 있음
Why are the BLAS functions in R2011b much faster than R2008a?
The developers continually work on squeezing a bit more efficiency out of the core math operations, so I'd expect to see an impr...

대략 14년 전 | 3

답변 있음
finding roots of the equation
You may want to check your function, because it doesn't seem to have any (real) zeros: f = @(n,I) n*210+(I.^2/n).*((((200-3...

대략 14년 전 | 1

| 수락됨

답변 있음
How does the MATLAB calculate the arctan?
All inverse trigonometry functions return to a specific limited range, because trig functions are periodic. Hence, if |x = 9*pi...

대략 14년 전 | 2

| 수락됨

답변 있음
suppressing the display of ans
What Wayne said. But to dig a bit deeper: given that you specifically said "function", I'm guessing you might be confused by th...

대략 14년 전 | 2

답변 있음
Difference between Array,Cell array and Subscripted elements of an array..??
Array = a single variable (of any data type) that contains multiple content elements. Cell array = a specific type of array i...

대략 14년 전 | 12

| 수락됨

답변 있음
Shaded areas in scatter figure
Something like this? patch([-0.25,0,0,-0.25],[1 1 3 3],[0.5 0 0.8],'FaceAlpha',0.4,'EdgeColor','none') patch([0,0.25,0.2...

대략 14년 전 | 0

| 수락됨

답변 있음
For loop calcs
This is truly weird, and the short answer is that I don't know why it's doing that. The values to loop over should be evaluated...

대략 14년 전 | 0

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

답변 있음
Display array values of varying orders of magnitude
|fprintf| with the |e| format will put everything in exponential notation: x = [1.234e16,42;0.3,6.789e8] fprintf([repmat...

대략 14년 전 | 1

| 수락됨

더 보기