已解决


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

5 years 前

已解决


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

5 years 前

已解决


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

5 years 前

已解决


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

5 years 前

已解决


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

5 years 前

已解决


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

5 years 前

已解决


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

5 years 前

已解决


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

5 years 前

已回答
Need help FOR loop question 3
Hey Reynaldo, Try the following code as an answer for i=1:5 new_A(i) = A(i)+i; new_B(i) = B(i)-i; new_C(i) = C(i)*i; new_D...

5 years 前 | 0

| 已接受

已回答
How to remove stock prices that falls on weekend ?
Hey Sana, After you have generated the logical vector you can use that logical vector as index positions to eliminate the value...

5 years 前 | 0

已回答
plotting multiple brownian motions curves on the same plot
Hey Katie, According to my understanding you are generating only one plot. If you want to plot a graph for each iteration of th...

5 years 前 | 0

已回答
Computing the 10,005th Prime Number
Hey Daniel, What James said makes sense, you must try the problem and ask about your doubts here. But here are some hints to ge...

5 years 前 | 0

已回答
SIMULINK model of a mass-spring with discrete external force is stuck
Hey Foad, I tried running your model at my end and similarly got stuck at ~29%. It actually isnt stuck, it is just progressing ...

5 years 前 | 0

已回答
Is there any plan to support python 3.x in MATLAB production server?
Hey, Like you said currently only Python 2.7 is supported for MATLAB Production Server. Any future plans for integrating python...

5 years 前 | 0

已回答
Advanced Line Plotting/ Recreation of old figure
Hey Michael, To plot multiple lines together on one graph with shared axes you can try using the hold command in the following ...

5 years 前 | 0

已回答
How can i reduce precision only in the maximum value of a column matrix?
Hey Elisa, The max() function returns the maximum value in an array and its index position. So using the following command we g...

5 years 前 | 1

已回答
Got my Uni licence activation code but not recognised when I attempt to install Matlab in Ubuntu 14.04
Hey, From your question it appears that you may have been inputting the Activation Key into the File Installation Key window. A...

5 years 前 | 0

已回答
How to Move Position of Z Axis Ticks on Plot3 Graph?
Tick direction can be changed using the TickDir property. The following will make the ticks point away from the graph: set(gca,...

5 years 前 | 0

已回答
after installation of matlab in my laptop ,when i click matlab icon it is not opening
Hey Yuganand, This issue seems similar to another reported and solved on MATLAB Answers. You can find the discussion here. If ...

5 years 前 | 0

已回答
How to plot time and date (x-axis) on predicted model?
Hey Ali, I tried running your code and with minimal change I got the date as the X- axis labels. Check if this is what you were...

5 years 前 | 0

| 已接受

已回答
How do you make a 3D plot with the given information?
Hey Abigail, What I understood is that you want to make a 3d plot from the second, third and fourth column of the data given. F...

5 years 前 | 0

已回答
Help with introducing hydro powered turbines into off-grid system with PV and Wind.
Hey Ryan, See if the following links help https://www.researchgate.net/publication/275329400_Simulation_Model_of_Hydro_Power_P...

5 years 前 | 1

| 已接受

已回答
How to plot the quadratic function surface?
Hey Seyyed, I was able to simplify the code by using vectorized operations instead of for loop clc clear Q = [0.7750 0.3897...

5 years 前 | 1

| 已接受

已回答
How to load data from a .mat file in a Simulink block for the generation of a C code?
Hey Harsh, To use a lookup table from a ‘.mat’ file, you can use the From File block to get your lookup table in a matrix for...

5 years 前 | 0

已回答
hwo can i fix the errors below
Hey Abdulrahman, Based on what I can understand I think there is a logical error in the 15th line of your code. F_of_u is a fu...

5 years 前 | 0

| 已接受

已回答
How can I disable font smoothing by default for all text , legend, marker, axes object within a plot?
You can try the following commands set(groot,'defaultAxesFontSmoothing', 'off'); set(groot,'defaultTextFontSmoothing', 'off'...

5 years 前 | 2

加载更多