Answered
How to delete all rows made out of a certain vector/array/row values from a matrix?
data( idx, : ) = []; will delete a row (or multiple rows), idx, from a matrix. Since you say you already have a way to fin...

9 years ago | 0

Answered
Problem with imrect and position vector returned.
I'm not really sure which 'wait' function is being called there. I don't see one in the documentation that takes an imrect as a...

9 years ago | 0

| accepted

Solved


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

9 years ago

Solved


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

9 years ago

Answered
Keeping xlabels but not xticks
hAxes.XAxis.TickLength = [0 0]; where hAxes is your axes handle. This assumes you are using a sufficiently recent version ...

9 years ago | 0

Answered
Storing the result of display function
result = 1749:1/12:2016; should give the same result in an array.

9 years ago | 1

| accepted

Answered
Flipping y-axis of findpeaks-plot
Don't you just want to negate the peak amplitude results rather than flip?

9 years ago | 0

Answered
Subtracting different matrices with NaN values
Just replace NaNs with 0s e.g. B( isnan(B) ) = 0;

9 years ago | 1

| accepted

Answered
When using FFT whats the correlation between linspace and t? In order to get the right frequency the w=linspace(0,2000,length(t))
If 2000 is your sample frequency in Hz then that should be fine for the full double-sided spectrum output of fft. Your plot sho...

9 years ago | 0

| accepted

Answered
How to convert ANS to MATRIX?
"To compute elementwise POWER, use POWER (.^) instead" result = ( 1 - y ).^2

9 years ago | 0

| accepted

Answered
How to call functions from another m file
You can't if the functions are defined as local functions in the script1 file. Just put the functions in their own separate f...

9 years ago | 7

| accepted

Answered
Struct as function input: different inputs?
I'm not entirely sure what you are trying to do here, but you seem to be confusing the 'obj' input/output argument in a class fu...

9 years ago | 0

Answered
if a value in variable A is equal to the one in varibale B, can I read the B-matching value (variable C) into a new variable D?
if (VAR.event(i).type) == BE.sentence(i) VAR.event(i).accuracy = BE.accuracy(i) end appears to be all you need at...

9 years ago | 0

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.

9 years ago

Solved


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

9 years ago

Answered
How can I get and read data files from a folder?
<http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F>

9 years ago | 2

| accepted

Answered
how to read column wise pixels using FOR LOOP
Judging from your last comment what you want is a plot of the number of black pixels in each column of the image: figure; a...

9 years ago | 0

| accepted

Answered
Error message after changing the string in GUI
Use dbstop if error and take a look at 'handles'. You appear to have lost the handles structure or replaced it with som...

9 years ago | 0

Answered
How to edit code generated with App Designer?
As far as I am aware the greyed out parts of the automatic code are un-editable. Everything else is editable as normal, althoug...

9 years ago | 1

Answered
Loading excel file by GUI
<https://uk.mathworks.com/help/matlab/creating_guis/share-data-among-callbacks.html How to share data among GUI callbacks>

9 years ago | 0

| accepted

Answered
Convert cell array to array of strings
s = string( a ); C = arrayfun( @(x) strsplit( x, '_' ), s, 'UniformOutput', false ); should work, or you could just use ...

9 years ago | 0

Answered
What is the difference between clear and clearvars?
In those simplest forms I don't think there is any difference. Both have extended arguments though that make them different, es...

9 years ago | 0

| accepted

Answered
for a range of x, say x=10, i need for x=1 to 3, y= f(x); for x= 4 to 7, y=g(x); for x=8 to 10, y=h(x); and how to present graph of x and y with x=1 to 10 using matlab coding?
There are many ways to make your code neater, but for minimal changes to what you have done, you need to assign results to an ar...

9 years ago | 0

| accepted

Answered
Want to combine RGB plane to form a specific color in an image
t1_r(1:5,1:5)=uint8(142) t1_g(1:5,1:5)=uint8(111) t1_b(1:5,1:5)=uint8(238) i1=cat(3,t1_r,t1_g,t1_b); figure; imsho...

9 years ago | 0

Answered
How to pass new value of parameter from GUI into .m script?
Use a function instead of a script and it is trivial number = str2double( get( hObject, 'String' ) ); myFunc( number ); ...

9 years ago | 0

| accepted

Answered
I want to change matrix value
myArray( myArray ~= someValue ) = someOtherValue;

9 years ago | 0

Answered
get character value from decimal
You should use doc num2str to convert a number to a string/char. Using direct casting will just give you whatever the U...

9 years ago | 0

Answered
How do I rectify the problem of [subscripted assignment dimension mismatch; at Line: dmdt(1) = N]? Much Thanks!
It depends what you intended as to how to fix it. Use a cell array if you really want to store everything that is returned. Yo...

9 years ago | 0

Answered
help with horzcat error
As the error says, the dimensions of the arrays you are trying to concatenate are not equal. At a guess, since you are doing di...

9 years ago | 0

| accepted

Load more