답변 있음
Plot only equilateral triangles
figure, hold on e = 0.01; i=0; while i<= 10 x = rand(3,1); y = rand(3,1); c = rand(3,1); L1 = sqrt((x(2)-...

3년 초과 전 | 0

| 수락됨

답변 있음
Plot only equilateral triangles
figure, hold on e = 0.0001; i=0; while i<= 10 x = rand(3,1); y = rand(3,1); c =rand(3,1); L1 = sqrt((x(2)...

3년 초과 전 | 0

답변 있음
How to enter multiple values for a single input in a function
Most Matlab functions are vector based. you should use .^ for vector based ^ and .* for vector based * So you function line loo...

3년 초과 전 | 0

답변 있음
how do i store a variable out of my function?
The first line should be function x = create_array(N,M,row_orient) to return the generated matrix

3년 초과 전 | 1

| 수락됨

답변 있음
generalized eignvalues/eignvectors
If you multiply both sides by inv(D) we will have: B*w = inv(D) * A * B So you can use: [w, invD] = eig(B, A); D = inv(InvD)...

3년 초과 전 | 0

답변 있음
Compute the summation of all elements square of matrix
% simply use sum(a(:))

3년 초과 전 | 0

문제를 풀었습니다


Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...

3년 초과 전

답변 있음
Line chart in matlab reading data points from file.csv
% change data.csv to your data file. should be in path data = csvread('data.csv',1,0) % the first row hold the header t = dat...

3년 초과 전 | 0

답변 있음
How to graph functions over time with a delay using MATLAB?
You can use: -10*exp(-.1*t).*(t>=5);

3년 초과 전 | 0

답변 있음
Only 1st layer of a 3D Matrix.
For layer 1: A(:,:,1) For layer i: A(:,:,i) For the central column: A(3,3,:)

3년 초과 전 | 1

| 수락됨

답변 있음
Plotting four plots when only two plot
The subplot command is subplot(2,1,1) which means 2 rows and one column. If you need 4 graphs at the same time you should use su...

3년 초과 전 | 0

답변 있음
Aggregate multiple CSV files as an average for each cell individually and result in one CSV file.
% % read folder % files = ls ('d:\test\*.csv'); for i = 1: size(files, 1) file = strtrim(files(i,:)); m = readmat...

3년 초과 전 | 0

답변 있음
create multiple spheres at given coordinates using a for loop or function and function call
You can use this code: xyz = [-8.67212090030965 -7.78294481282592 4.19809966191787 4.30363429770975 -6.33796132936349 2.304121...

3년 초과 전 | 0

| 수락됨

답변 있음
about location and input
So, the location is path to the folder containing the data file, for example : location = 'c:/dipole_tess'; FILE_NAME will be t...

3년 초과 전 | 0

| 수락됨

답변 있음
Aggregate multiple CSV files as an average for each cell individually and result in one CSV file.
% % read folder % files = ls ('e:\test\*.csv'); for i = 1: size(files, 1) file = files(i,:) m = readmatrix(['e:\t...

3년 초과 전 | 0

| 수락됨

문제를 풀었습니다


Missing five
Convert decimal numbers to a base-9 notation missing the digit *5* <<http://www.alfnie.com/software/missing5.jpg>> Too man...

거의 4년 전

문제를 풀었습니다


Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

거의 4년 전

문제를 풀었습니다


Elements with highest local average
Input v is a row vector such that length(v)>3. Consider a sliding window of length 3 that is used to calculate the local average...

거의 4년 전

문제를 풀었습니다


Sum my indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

거의 4년 전

문제를 풀었습니다


Split array into pieces according to corresponding array
An array x of length n has values 1...m with each value appearing at least once. The values are sorted (n>=m). A second...

거의 4년 전

문제를 풀었습니다


Neither minima nor maxima
Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

거의 4년 전

문제를 풀었습니다


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

대략 4년 전

문제를 풀었습니다


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

4년 초과 전

문제를 풀었습니다


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

4년 초과 전

문제를 풀었습니다


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

4년 초과 전

문제를 풀었습니다


Simple return on investment
Assume you have some money and want to invest all your money to stock market. You randomly select a stock and invest all your mo...

4년 초과 전

문제를 풀었습니다


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

4년 초과 전

문제를 풀었습니다


Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

4년 초과 전

문제를 풀었습니다


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

4년 초과 전

문제를 풀었습니다


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

4년 초과 전

더 보기