Solved


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

3 månader ago

Answered
How to link an App-Designer push button to a keyboard key?
Hey, you can implement the callback UIFigureKeyRelease on your UIFigure object. Then, you juste have to implement the code to g...

3 månader ago | 0

Answered
License hostID does not match license id
Hi Wiliam, the license is connected to your harddrive. So if you copy the content of your harddrive on a new one, you have to d...

3 månader ago | 0

| accepted

Answered
How to call a python program from matlabr2019a
Hey Saugata, you should follow this guide from mathworks: Undefined variable "py" or function "py.command" It helps you to ens...

3 månader ago | 0

Answered
rename the image name
Hey, I think, the commands that could help you are the following: movefile('src', 'dest'); % move a file, you can even...

3 månader ago | 0

Answered
Finding index location in volume?
Hi, for your case, I would write your code like that: x = 2000:0.5:2004; y = 45000:0.3:45009; z = 10:0.2:12; % no need to u...

3 månader ago | 1

Answered
Bilinear interpolation of gridded data
Hi, may I recommand you to take a look at the function griddedInterpolant to solve your case? It will be definitely faster than...

3 månader ago | 0

Answered
How to split merged signals
Hello Anna, I am not very familiar with the merge block, but apparently, you cannot put a scope on the signals you are gonna me...

3 månader ago | 0

Answered
how to do Serial and Parrarell computing, multiple simulink models in a loop?
Hi Mona, I would recommend you to take a look at the parsim command. Its documentation is very well done and give multiple exam...

3 månader ago | 0

Answered
Problem with diff operating on a row vector from regionprops
Hi Jason, I tried the following code: MM = [53742.57, 18435.82, 49121.64, 54437.08]; y = diff(MM); I get the following answ...

3 månader ago | 0

| accepted

Answered
Complex number math problems
Complex numbers work literally like all other numbers in MATLAB. The only interesting things are how you create them: z1 = 1 + ...

3 månader ago | 1

| accepted

Solved


Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

3 månader ago

Answered
Dealing with wrong input
Okay, then I would use the exception catching method: str = ''; num = NaN; while isnan(num) try num = input('Pl...

3 månader ago | 0

Answered
How can i find cumulative mean inside a for loop?
Hi, For your situation, you should consider that . So they are 2 situations: All vectors have the same size Vectors can have ...

3 månader ago | 0

| accepted

Answered
How to save tables to different sheets in one xlsx file?
Have you done a step-by-step execution of your code to be sure that there are multiple files read? Looking at it like that, I w...

3 månader ago | 0

| accepted

Answered
Program output is correct but not plotting anything
Hi Griffin, please in future, post your code into the post. It makes the life of others easier than having to read it into a fi...

3 månader ago | 0

| accepted

Answered
open large csv file
Hi Asad, have you considered using readcell or readtable depending of what you need for data type? You can configure it to defi...

3 månader ago | 0

Solved


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

3 månader ago

Solved


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.

3 månader ago

Solved


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

3 månader ago

Solved


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

3 månader ago

Solved


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

3 månader ago

Solved


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

3 månader ago

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

3 månader ago

Solved


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

3 månader ago

Solved


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

3 månader ago

Solved


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

3 månader ago

Solved


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

3 månader ago

Solved


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

3 månader ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

3 månader ago

Load more