解決済み


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

約7年 前

解決済み


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

約7年 前

解決済み


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

約7年 前

解決済み


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

約7年 前

解決済み


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

約7年 前

解決済み


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

約7年 前

解決済み


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

約7年 前

解決済み


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

約7年 前

解決済み


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

約7年 前

解決済み


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

約7年 前

解決済み


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

約7年 前

解決済み


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

約7年 前

回答済み
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...

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

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

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

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

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

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

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

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

約7年 前 | 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,...

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

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

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

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

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

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

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

約7年 前 | 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'...

約7年 前 | 2

さらに読み込む