Answered

How to implement 2 vectors in a for-loop to get a matrix?

[A,B]=ndgrid(a,b); Then a single for-loop will do

How to implement 2 vectors in a for-loop to get a matrix?

[A,B]=ndgrid(a,b); Then a single for-loop will do

4 days ago | 0

Answered

학교 정보 변경하는 방법

Even if sometimes staff members look on this forum and post from time to time, the help on this forum is mostly provided by peop...

학교 정보 변경하는 방법

Even if sometimes staff members look on this forum and post from time to time, the help on this forum is mostly provided by peop...

5 days ago | 0

Answered

Error "too many input arguments"

You misread the error message slightly. The source of your issue is here: disp ('code2 =', code2) The disp function only allow...

Error "too many input arguments"

You misread the error message slightly. The source of your issue is here: disp ('code2 =', code2) The disp function only allow...

5 days ago | 0

| accepted

Solved

Draw a 'Z'.

Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

5 days ago

Solved

Draw 'O' !

Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

5 days ago

Solved

Draw 'I'

Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

5 days ago

Solved

Draw 'F'

Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

5 days ago

Solved

Draw 'D'.

Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

5 days ago

Solved

Draw a 'N'!

Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

5 days ago

Solved

Draw 'C'.

Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...

5 days ago

Solved

Draw 'H'

Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

5 days ago

Solved

Draw 'J'

Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

5 days ago

Solved

Draw a 'X'!

Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

5 days ago

Solved

Draw 'B'

Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

5 days ago

Answered

log base 10 plot

You're plotting a single value, but you left the default for plot, which is to only show lines, not markers. So your plot looks ...

log base 10 plot

You're plotting a single value, but you left the default for plot, which is to only show lines, not markers. So your plot looks ...

6 days ago | 0

| accepted

Answered

nohup matlab - how to pass input to scripts

So actually your question is how to define a char array inside such a call. I suspect you simply need to escape the quotes: noh...

nohup matlab - how to pass input to scripts

So actually your question is how to define a char array inside such a call. I suspect you simply need to escape the quotes: noh...

6 days ago | 0

Answered

For loop with use of larger than

It sounds like one of the functions related to histcounts is appropriate here. angles=rand(500,1)*2*360-360; pressure=sind(ang...

For loop with use of larger than

It sounds like one of the functions related to histcounts is appropriate here. angles=rand(500,1)*2*360-360; pressure=sind(ang...

6 days ago | 0

Answered

How to use First button function codes "symbol name" in Second button function in App Designer

Don't use global variables. There are many other ways to share data between callbacks. You should probably store the variable in...

How to use First button function codes "symbol name" in Second button function in App Designer

Don't use global variables. There are many other ways to share data between callbacks. You should probably store the variable in...

6 days ago | 0

| accepted

Solved

~~~~~~~ WAVE ~~~~~~~~~

|The WAVE generator| Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...

6 days ago

Solved

Remove the air bubbles

Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

6 days ago

Solved

Draw 'E'

Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

6 days ago

Solved

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

6 days ago

Solved

We love vectorized solutions. Problem 1 : remove the row average.

Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

6 days ago

Solved

intersection of matrices

Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

6 days ago

Solved

Generate N equally spaced intervals between -L and L

Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

6 days ago

Solved

Create logical matrix with a specific row and column sums

Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

6 days ago

Answered

How to sum different cells of cell array

Something like this should work: data={[1,2,3;4,5,6],[3,24,35;46,58,69]; [10,2,3;24,85,6],[11,22,33;54,15,16]}; data=perm...

How to sum different cells of cell array

Something like this should work: data={[1,2,3;4,5,6],[3,24,35;46,58,69]; [10,2,3;24,85,6],[11,22,33;54,15,16]}; data=perm...

6 days ago | 0

Answered

How to plot vectors with different lenght

You need to make sure your data matches up. You can either remove the x-values you don't have a y for, or add NaN values for tho...

How to plot vectors with different lenght

You need to make sure your data matches up. You can either remove the x-values you don't have a y for, or add NaN values for tho...

6 days ago | 1

| accepted

Answered

How to create a string that depends on user input variables?

You can create this text with sprintf and some minor tweaks: str=sprintf('p(%d)*x^%d +', [1:d;(d-1):-1:0]); str=strrep(str...

How to create a string that depends on user input variables?

You can create this text with sprintf and some minor tweaks: str=sprintf('p(%d)*x^%d +', [1:d;(d-1):-1:0]); str=strrep(str...

9 days ago | 0

Answered

Adding numbers in a row vector

You can do it with a for loop, but you should use cumsum instead.

Adding numbers in a row vector

You can do it with a for loop, but you should use cumsum instead.

9 days ago | 0

| accepted