解決済み


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

8年以上 前

解決済み


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

8年以上 前

解決済み


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

8年以上 前

解決済み


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

8年以上 前

解決済み


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

8年以上 前

解決済み


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

8年以上 前

解決済み


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

8年以上 前

解決済み


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

8年以上 前

解決済み


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

8年以上 前

解決済み


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

8年以上 前

解決済み


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

8年以上 前

回答済み
How to get two adjacent columns in loop
You need not use a for loop for this. rData = DATA(:,2:2:end-1) % Get all the real data col 2,4,6...1022 iData = DATA(:,3:...

8年以上 前 | 1

回答済み
How to save certain values in a FOR loop
just before the start of the first for loop, define an empty matrix, this will be the storage for all the valid step-values. Rep...

8年以上 前 | 0

| 採用済み

回答済み
How to display continuous changing values in static text of GUI
I think your code is working fine. Try putting a little time delay before setting the string of handles.text1. Something like, ...

8年以上 前 | 0

回答済み
delete element from vector
% Use logical indexing a = a(a~=3)

9年弱 前 | 0

解決済み


Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<http://upload...

9年弱 前

解決済み


Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

9年弱 前

回答済み
Where can I insert my Operation and How to display the result in Static Text?
Please see the attached files.

9年以上 前 | 0

| 採用済み

回答済み
Can I run a "clear java" command but still keep a variable in the workspace?
I guess you can store those java variables in a structure and run "clear java"; the variables should still be available in the s...

9年以上 前 | 0

回答済み
separating x and y from an equation
%% USE regexp to split the string % str = regexprep('2x-3y^2','(\d+)(\w+)','$1*$2'); str = regexprep(str,'(\w+...

9年以上 前 | 0

回答済み
How to remove the tic labels but not the marks?
%% To remove tick marks on the y-axis tickMarks = {'YTick',[]}; set(gca,tickMarks{:});

9年以上 前 | 1

回答済み
How to remove the tic labels but not the marks?
%% Remove tick labels for the X and Y axes tickCell = {'XTickLabel',{},'YTickLabel',{}}; set(gca,tickCell{...

9年以上 前 | 1

回答済み
How do I ignoring '\n' at the end of the text file that was created?
You are appending that extra line. What you can do is change: fprintf(output,'%s\n',line) to fprintf(output,'...

9年以上 前 | 0

| 採用済み

解決済み


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

10年弱 前

回答済み
selecting file from a database (.txt files) ?
function files = listFiles(key,directory,ext) %% LIST FILES % key : the machine name or day % : if search...

10年弱 前 | 0

| 採用済み

回答済み
selecting file from a database (.txt files) ?
Please see attached file.

10年弱 前 | 0

回答済み
How to optimize this code?Please help me and guide me in this direction.
To store matrices in a matrix you need to use a cell array. A cell array is capable of storing any data type. Hence we are first...

10年弱 前 | 0

回答済み
Select every Nth row from number groups
a = [1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1]; isTake = false; newMatrix = nan*ones(size(a)); count = 0; for...

10年弱 前 | 0

回答済み
How can I create a matrix out of a matrix?
indices = find(any(A,2)); B = [indices A(indices,:)];

10年弱 前 | 1

解決済み


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年 前

さらに読み込む