Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 1

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 1

| akzeptiert

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

mehr als 5 Jahre vor | 1

| akzeptiert

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

mehr als 5 Jahre vor | 0

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

mehr als 5 Jahre vor | 0

| akzeptiert

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

mehr als 5 Jahre vor | 2

Mehr laden