문제를 풀었습니다


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

5년 초과 전

문제를 풀었습니다


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.

5년 초과 전

문제를 풀었습니다


Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

5년 초과 전

문제를 풀었습니다


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

5년 초과 전

문제를 풀었습니다


Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

5년 초과 전

문제를 풀었습니다


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

5년 초과 전

문제를 풀었습니다


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

5년 초과 전

문제를 풀었습니다


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

5년 초과 전

문제를 풀었습니다


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

5년 초과 전

문제를 풀었습니다


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...

5년 초과 전

문제를 풀었습니다


Solve a System of Linear Equations
*Example*: If a system of linear equations in _x&#8321_ and _x&#8322_ is: 2 _x₁_ + _x₂_ = 2 _x₁...

5년 초과 전

문제를 풀었습니다


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

5년 초과 전

문제를 풀었습니다


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

5년 초과 전

문제를 풀었습니다


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

5년 초과 전

문제를 풀었습니다


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

5년 초과 전

답변 있음
ginput tic tac toe
You can set xlim and ylim for your axes to [0 3]. Then you can get the [x,y] = ginput(1). Another option would be to use 9 ...

5년 초과 전 | 0

답변 있음
compiled matlab .net assembly doesn't work on different computer
You need to install the MATLAB runtime to use the .net assembly.

5년 초과 전 | 1

문제를 풀었습니다


One-hot encoding

5년 초과 전

답변 있음
How to perform logical AND on intervals of contiguous locations
You can group based on the values of x. gid = cumsum(x ~= circshift(x,1)); if(gid(1) == 0) gid = gid + 1; end a = splitappl...

5년 초과 전 | 0

답변 있음
How to Import/parse sparse data from a text file into MATLAB?
After some testing, it seems your file can be read by setting delimiter to 3x spaces. You can combine this with the rest of you...

5년 초과 전 | 0

| 수락됨

답변 있음
Make App designer app files inaccessible
According to MATLAB documentation, protecting simulink model requires simulink coder license. References https://www.mathwork...

5년 초과 전 | 0

| 수락됨

답변 있음
Unevenly Map Data to an RGB Map?
You can use the colormapeditor GUI to interactively create the colour map. https://www.mathworks.com/help/matlab/ref/colormap...

5년 초과 전 | 0

답변 있음
Passing varibales between two callback in GUI
Use the function setappdata and getappdata instead. An example is shown here in the documentation. https://www.mathworks.com/h...

5년 초과 전 | 1

| 수락됨

답변 있음
Invalid training data. The output size (8) of the last layer does not match the number of classes (6).
Your final layer has 8 outputs, however your image data store only has 6 labels / classes. If you expect there to be 8 classes, ...

5년 초과 전 | 0

답변 있음
Unable to run two function simultanously under App Designer
MATLAB is single threaded, if you wish to run tasks in parallel, you have to use parpool from parallel computing toolbox.

5년 초과 전 | 0

답변 있음
How to randomize the order of training images of a CNN?
if isShuffleable(Train_imds) newds = shuffle(Train_imds); disp('Shuffling successful.') else disp('Datastore is ...

5년 초과 전 | 0

| 수락됨

답변 있음
strange cell array to matrix
Use the function readtable (or readmatrix) to load your file. opts = delimitedTextImportOptions('NumVariables',2,'Delimiter',';...

5년 초과 전 | 0

답변 있음
Problem allocating 24 workers using parpool
Perhaps you can try core = feature('numcores'); pool = parpool('local',core); disp(['Pool has been started with Num Workers '...

5년 초과 전 | 0

답변 있음
Copy files, save the content, and change files name from code
From your question i assume the names in cell array are without the extensions. ext = '.dat'; %Cell_Array_A %Cell_Array_B f...

5년 초과 전 | 0

답변 있음
Import series of CSV files and perform data crunching
You need to set the NumHeader Lines to ignore the first 6 lines. folderwcsv = 'somepath'; csvs = dir(fullfile(folderwcsv,'*.cs...

5년 초과 전 | 0

| 수락됨

더 보기