Respondida
randn() function generates the same sequence whenever I called it.
Use rng function for k=1:10 rng(k) randn(1,10) end

alrededor de 11 años hace | 0

| aceptada

Respondida
How to select a submatrix from a bigger one?
idx=input('choose your 15 columns') M=A(:,idx)

alrededor de 11 años hace | 0

Respondida
How I plot 3d graph of known x,y,z ?
z= [ 2220.6 0 0 0 0 1160.4 1106.3 0 0 0 806.9 0 734.86...

alrededor de 11 años hace | 0

Respondida
Plotting N days values in N Y axes
If you want multiple plot in one axis use hold on doc hold

alrededor de 11 años hace | 0

Respondida
how to ask the User to inform elements to compose a matrix
I think it always gives error. b=4 Neuron = zeros(1,b-1) ; for jj=1:b-1 p = input ('enter the number of the neur...

alrededor de 11 años hace | 0

Respondida
how to get a smaller matrix from a larger matrix?
A(1:8,1:8) After reading the <http://www.mathworks.com/help/matlab/matrices-and-arrays.html documentation>, you don't need ...

alrededor de 11 años hace | 4

| aceptada

Respondida
cell array and each individual element in it
repmat({zeros(1,4)},6,6)

alrededor de 11 años hace | 0

Respondida
Is there a way to run editor and simulink side by side
You can <http://www.mathworks.com/help/simulink/slref/matlabfunction.html Matlab function block>

alrededor de 11 años hace | 0

Respondida
How can I rotate my x axes made by words?
If you are using version of Matlab after 2014b set(gca,'xticklabelrotation',45) If you haven't the latest version of Mat...

alrededor de 11 años hace | 0

| aceptada

Respondida
Not able to write the binary data into the text file
student_id=66438; a=dec2bin(student_id,16) studID = fopen('D:\stid.txt','wb'); fprintf(studID,'%s',a) fclose(studID)

alrededor de 11 años hace | 0

Respondida
log and Exponential Equations: logb^300=30, find b)
syms b sol=solve(log(b^300)==30)

alrededor de 11 años hace | 0

Respondida
The usage of find in matlab for finding the length of repeated element
In your case find is not doing the job, your code doesn't give the expected result x=[1 1 1 2 2]; index=[find(x(1:end-1) ~...

alrededor de 11 años hace | 1

Respondida
I wanna create vector of structures
ii=1:10 vec=struct('a',num2cell(ii),'b',num2cell(20-ii),'c',num2cell(ii+3))

alrededor de 11 años hace | 1

Respondida
Finding minimum value between certain rows
idx= [diff(A(:,3)')==0 0]; ii2=find(idx==0); ii1=[1 ii2(1:end-1)+1]; B=zeros(numel(ii1),size(A,2)); C=zeros(numel(ii1),2);...

alrededor de 11 años hace | 0

| aceptada

Respondida
Why is cell2mat returning a char array and not an ordinary array?
Kim what is an ordinary array? array of string doesn't exist in Matlab. s={'ab' 'cd';'er','mh'} cell2mat(s) Result ...

alrededor de 11 años hace | 0

| aceptada

Respondida
How to adjust GUI to fit screens of varying resolution
Get the screen size screensize = get( 0, 'Screensize' )

alrededor de 11 años hace | 0

Respondida
Unable to display symbolic expression
Try to display the first element of Test.t1 Test.t1(1) Output truncated. Text exceeds maximum line length of 25 000...

alrededor de 11 años hace | 0

Respondida
[a,b]=[1,2] why does not work? How I correct it?
d={1 2}; [a,b]=d{:}

alrededor de 11 años hace | 0

Respondida
Line chart from 3D data at a fixed point
A=rand(296,301,648); %Example time=1:648; y=squeeze(A(250,250,:)) plot(time,y)

alrededor de 11 años hace | 0

| aceptada

Respondida
how to compare the values of two matrix??
id=isequal(A,B)+1 str={'different matrices','equal matrices'}; str{id}

alrededor de 11 años hace | 0

| aceptada

Respondida
How to transform the below quadrant plot in to a semicircle plot?
fill([-1 1 1 -1 ],[0 0 1 1 ],'b') hold on w=0:0.1:pi x=cos(w) y=sin(w) plot(x,y,'w','linewidth',6) h=area(x,y,'facecolor...

alrededor de 11 años hace | 0

| aceptada

Respondida
Keep plots results for several function calls
Use hold on. doc hold

alrededor de 11 años hace | 0

| aceptada

Respondida
How to convert an image file to text file & display the text file ?
imgHex=cellstr(imgHex) fid = fopen('im16_1.txt', 'wt'); fprintf(fid, '%s\r\n', imgHex{:}); fclose(fid)

alrededor de 11 años hace | 0

Respondida
Discrete Transfer function numerator/denum values from Workspace and HDL code generation
assigning values to your block parameters directly in the block or in the workspace is the same thing

alrededor de 11 años hace | 1

Respondida
how to count non zero elements in a vector and replace this values based on the count values
v= [0 0 0 0.1 0.2 0.3 0.4 0.5 0 0 0 0 0 0 0.1 0.2] idx=[0 v~=0 0] idx1=strfind(idx,[0 1]) idx2=strfind(idx,[1 0])-1 id=idx...

alrededor de 11 años hace | 0

| aceptada

Respondida
Finding peaks only in signal
[peak,idx]=findpeaks(YourSignal,'minpeakwidth',1000)

alrededor de 11 años hace | 0

Respondida
for loop vectorization using cells
s=arrayfun(@(x) randi(9,36,1),1:10,'un',0) %Example locCOR=sum(cell2mat(s),2)

alrededor de 11 años hace | 0

| aceptada

Respondida
How to xlswrite cell array with both strings and number?
A={'''01:02:03'};

alrededor de 11 años hace | 0

| aceptada

Respondida
save and load command give error
Change the folder where you want to save your file. Choose for example documents

alrededor de 11 años hace | 0

Respondida
How to load a cell array which contains both strings and numbers to matlab?
For Excel file use xlsread function [num,text,both]=xlsread('FileName')

alrededor de 11 años hace | 0

| aceptada

Cargar más