Frantisek Gaspar
Followers: 0 Following: 0
Feeds
문제를 풀었습니다
Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.
9개월 전
문제를 풀었습니다
Angle Between Analog Clock Hands
Given a datetime variable t, return the angle (in degrees) between the hour and minute hands of an analog clock at the time repr...
9개월 전
문제를 풀었습니다
Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...
9개월 전
문제를 풀었습니다
Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...
9개월 전
문제를 풀었습니다
Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....
1년 초과 전
문제를 풀었습니다
Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...
1년 초과 전
문제를 풀었습니다
Calculate Amount of Cake Frosting
Given two input variables r and h, which stand for the radius and height of a cake, calculate the surface area of the cake you n...
1년 초과 전
문제를 풀었습니다
Convert from Fahrenheit to Celsius
Given an input vector F containing temperature values in Fahrenheit, return an output vector C that contains the values in Celsi...
1년 초과 전
답변 있음
using a Monte Carlo simulation with 100,000 trials to find the probability of a random integer that is larger than the other random integer in [4,21]
%% Parameters I_min = 4; I_max = 21; n_trials = 1e4; %% Simulation A_value = I_min:I_max; B_random_value = randi( .....
using a Monte Carlo simulation with 100,000 trials to find the probability of a random integer that is larger than the other random integer in [4,21]
%% Parameters I_min = 4; I_max = 21; n_trials = 1e4; %% Simulation A_value = I_min:I_max; B_random_value = randi( .....
거의 2년 전 | 0
답변 있음
I need to take the data of more than 100 excel files. I have managed to obtain the name of each one of the files but when I use readmatrix it gives me an error.
For reading tabular data I recomend readtable function. The function can be set to handle various files and is quite robust. If ...
I need to take the data of more than 100 excel files. I have managed to obtain the name of each one of the files but when I use readmatrix it gives me an error.
For reading tabular data I recomend readtable function. The function can be set to handle various files and is quite robust. If ...
거의 2년 전 | 0
문제를 풀었습니다
Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...
2년 초과 전
문제를 풀었습니다
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.
2년 초과 전
문제를 풀었습니다
Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...
2년 초과 전
문제를 풀었습니다
Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...
2년 초과 전
문제를 풀었습니다
Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.
2년 초과 전
문제를 풀었습니다
Get the length of a given vector
Given a vector x, the output y should equal the length of x.
2년 초과 전
문제를 풀었습니다
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...
2년 초과 전
문제를 풀었습니다
Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...
2년 초과 전
문제를 풀었습니다
Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...
2년 초과 전
문제를 풀었습니다
String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...
2년 초과 전
문제를 풀었습니다
Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...
2년 초과 전
문제를 풀었습니다
Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....
2년 초과 전
문제를 풀었습니다
Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'
2년 초과 전
문제를 풀었습니다
Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...
2년 초과 전
문제를 풀었습니다
Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...
2년 초과 전
문제를 풀었습니다
Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...
2년 초과 전