Community Profile

photo

Li Ding


Last seen: quasi 2 anni fa Attivo dal 2017

Statistiche

All
  • Knowledgeable Level 1
  • First Answer
  • Introduction to MATLAB Master
  • Community Group Solver
  • First Review
  • Commenter
  • Promoter
  • Solver

Visualizza badge

Content Feed

Visto da

Risposto
How to combine multiple CSV files with Headers?
Use a for loop to repeat reading each one and combing them one by one. These two commands will be inside the loop: newSheet = ...

quasi 2 anni fa | 0

Risposto
Display names of empty tables in a msgbox
You need to create such a text string using sprintf() before calling it in msgbox. text_to_display = sprintf('No data for %s',...

quasi 2 anni fa | 0

| accettato

Risolto


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

oltre 3 anni fa

Risolto


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

oltre 3 anni fa

Risolto


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Multiplication
Multiply two numbers in a different manner. The numbers are given to you as vectors x and y. Example x = [ 1 2 0 1 ] ...

oltre 3 anni fa

Risolto


Subtract integers and add doubles
Create a function that subtracts a from b if a and b are integers and adds them if they are floats.

oltre 3 anni fa

Risolto


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

oltre 3 anni fa

Risolto


Airline Ticket Mod7 Checksum
There are 13 digits in an airline ticket number. If an airline ticket number is valid, the 13th digit should be the remainder of...

oltre 3 anni fa

Risolto


Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

oltre 3 anni fa

Risolto


Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

oltre 3 anni fa

Risolto


Put two time series onto the same time basis
Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

oltre 3 anni fa

Risolto


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

oltre 3 anni fa

Carica altro