Answered
Error using plot Vectors must be the same length
size(VW) ans = 2001 2001 size(G) ans = 171 10 You cant plot these two against each other

6 years ago | 0

Answered
Bar plot (within a subplot) for unequally spaced X axis points
Do not plot bar against xIdx, plot it against [1 2 3, ....] generate xticks (you can skip this step) convert xIdx to cell, and...

6 years ago | 2

| accepted

Answered
Cell array output from function file
That is because you are running the Function directly which will give you only 1 output Instead of runing directly, call your f...

6 years ago | 0

Answered
foor loop that outpus a vector question
x = [1 2 3 4; 70 62 45 65; 23 17 19 20; 51 34 56 72]; cond = [60 20 50]; ind = avada(x,cond) Initialize false array whic...

6 years ago | 0

| accepted

Answered
How do I extract specific data from an array inside a cell array using indexing?
use cellfun cellfun(@(x) x(3),B(1,:))

6 years ago | 0

| accepted

Answered
color changing bar graph
Now i am giving you code for only generating 1 peak which is random, you ve to generate the remaining by yourself figure, h=ba...

6 years ago | 0

| accepted

Answered
Error using reshape To RESHAPE the number of elements must not change.
suppose that winsize = 85; cleanAudio = rand(1,25000); Now type following in cmd (length(cleanAudio)/winsize) = 25000/85 =...

6 years ago | 0

Answered
vertical throw in matlab?
Define three different times for acceleration, velocity and position if there time is different (remember that each time vector ...

6 years ago | 0

Answered
Perform operations on a cell variable
Read this https://www.mathworks.com/help/matlab/ref/cellfun.html

6 years ago | 0

| accepted

Answered
This is Driving Me Crazy: How can I get an index to follow a value, Find the Lowest Value in The Matrix WITHOUT Min and get it to display the Index as the lowest #?
z = [3 4 7 8 511 818 379 812]; when you are using min here, it is comparing rows with each other and gi...

6 years ago | 1

Answered
Compute the value of pi using the following series
n = 1:1000; pi_1=sqrt(16*sum(1./((2*n - 1).^2.*(2*n + 1).^2))+8); pi-pi_1

6 years ago | 0

| accepted

Answered
Looking to write a code which utilises a formula to solve an equation
k=100; xR = zeros(1,k); xR(1) =2; % Initial Guess for i=2:k xR(i) = 1+ (1/xR(i-1)); % iterative formula end Now xR is an ...

6 years ago | 0

Answered
Function handle with inputs
You input phi_i in function W as follow ii = 1:m; m = m; Now you feed input W function a value (m), suppose 3 the function ...

6 years ago | 0

Answered
Why is interp2 producing NaN values?
I think it is because you are touching boundaries. Try values below xi = 1 + (500 - 1).*rand(1000,1); yi = 1 + (500 - 1).*r...

6 years ago | 0

Answered
For loop with multiple variables
eval Function (Not Recommended) but it will do what you are trying here www.mathworks.com/help/matlab/ref/eval.html

6 years ago | 0

Answered
Flip the y-axis values?
set(gca,'YDir','reverse')

6 years ago | 0

| accepted

Answered
Signal Labeler is not loading the data
Now Try this z = randn(2631,75)+1j*randn(2631,75); You cant see z in signal analyzer because it is complex I beleive your dat...

6 years ago | 0

Answered
Help needed in highlight function # Im getting error dont know what is wrong please help
MATLAB is an american software, so the spelling of Colour are different, it is Color highlight(p,sp,'EdgeColor','black') % Ed...

6 years ago | 1

| accepted

Answered
Why the loop still run after get to the of the array
With Your Code (For Loops) clc;clear; %create arrays x=[1 1 1 0 0 0 2 2 2]; y=[1 0 2 1 0 2 1 0 1]; for i=1:length(x)...

6 years ago | 0

| accepted

Answered
Subscripted assignment dimension mismatch for table variable
I dont know how to define it from size but there's an other way T_partialdata = table([1;2;3],[4,4;5,5;6,6],[7;8;9]) sz = [10 ...

6 years ago | 1

| accepted

Answered
Is possible to do an one line plot for structure array with different vector sizes
1- The long method dc = struct2cell(data); x = squeeze(dc(1,1,:));% as x is the 1st field y = squeeze(dc(2,1,:));% as y is th...

6 years ago | 0

Answered
Using MATLAB’s FFT Command evaluate Discrete Time Fourier Series for x[n] = cos(6πn/17 + π/3)
Plot Signal (Real and Imaginary) real(y) imag(y) Plot Magnitude abs(y) Plot Phase angle(y)

6 years ago | 0

Answered
set(handles.Low,'String',Low
Your figure (or gui) is closed that's why this error occured It looks like you have some text type object on figure like title,...

6 years ago | 0

Answered
Write xtick in two lines and write values of plot in figure
1. xtick issue I tried to move xtick to next line but cant, so instead of xtick i used text for that purpose MAPE =[0.612 0.53...

6 years ago | 0

| accepted

Answered
how do i extract columns with specific row names from .csv file
ind =strcmp(files.location,'India'); files(ind,:)

6 years ago | 1

| accepted

Answered
How do I count the total number of objects detected?
sum([imageStats(:).Solidity]>0.7)

6 years ago | 0

| accepted

Answered
How can I plot a very dense discrete signal?
Currently you are using command stem(x,y) now instead of using stem, try plot plot(x,y,'.') % where '.' means that you wan...

6 years ago | 0

Answered
dsp.ZeroCrossingDetector: a confusing error
dsp.ZeroCrossingDetector needs column vector as an input while you are feeding it a row vector take transpose of x x = (0 : pi...

6 years ago | 0

| accepted

Answered
continue or break a loop from a function
You can signal that using flags for i =1:5 flag= test(i); if(flag) continue; end end And the function is ...

6 years ago | 1

| accepted

Answered
I want to take R, G, B color components of an pixel by logical indexing, check channel values, and create new binary image but error occures at the command related with logical indexing
Replace && with & binaryImage( (arr(:,:,1)>50) & (arr(:,:,2)<20) & (arr(:,:,3)<165)) = 1

6 years ago | 1

| accepted

Load more