Answered
I want to plot a graph for z by increasing the values of i from 0.0000 to 0.0001 increasing with step of 0.0002.
You have several errors in your code. := doesn'texist in matlab (use the operator =). plot(z,i) will plot one point (the last ...

10 years ago | 0

| accepted

Answered
Find the string from the cell array
a = {'s_ddfa_af' ; 'adfa' ; 'f_dsfa_dasf_sdf'; 'asdf_dd'}; out=regexpi(a,'^s\w*','match')

10 years ago | 1

| accepted

Answered
What is wrong with this sequence?
When k=1, k-2 is negative, and k-1 is equal to zero

10 years ago | 0

Answered
How to convert a cell column of numerical data in a cell array to a matrix or column vector containing those numerical data?
A = {[1205:1:1211], [7]; [1881], [1]; [2449:1:2458], [10]}; B=cellfun(@(x) x',A,'un',0)

10 years ago | 1

| accepted

Answered
Find does not work as in the help of Matlab2015a ?
You probably used the function find as a variable. to fix the problem type clear find

10 years ago | 0

| accepted

Answered
Produce a Date vector starting with a desired date
d1='192607' d2='201412' dd1=datenum(d1,'yyyymm') dd2=datenum(d2,'yyyymm') out=datestr(dd1:dd2,'yyyymm')

10 years ago | 0

Answered
Extracting element values from a matrix in Simulink
You can use a <http://www.mathworks.com/help/simulink/slref/selector.html selector block>

10 years ago | 0

| accepted

Answered
Take samples from the previous sample
x=1:100 k=1; out{k}=x while numel(out{k})>10 n=numel(out{k}); idx=randperm(n-1); out{k+1}=out{k}(idx); ...

10 years ago | 0

Answered
How to have two seperate y labels for the same line?
t = 1:50; y = logspace(1,5); y2 = (y/1000000)*100; plot(t,y) hold on plot(t,y2) Or plotyy(t,y,t,y2)

10 years ago | 0

| accepted

Answered
How to convert a normailized matlab position vector to a pixel vector?
figure set(gcf,'units','pixel') pos=get(gcf,'position') You can choose one of these options {'inches' 'centimeters' '...

10 years ago | 1

| accepted

Answered
Matlab xlswrite error "Index exceeds matrix dimensions"
Check if xlswrite was not used as a variable. Fix the problem: clear xlswrite outputfile='Test.xlsx'; A=[1 2 3]; xlsw...

10 years ago | 0

| accepted

Answered
Need help looping through each element in cell array and editing the elements?
str='5/13/2014 16:14,911,724 Biomarkers_neuron_ca_T05-13-14.csv' out=regexpi(str,'\<Biomarkers.+','match')

10 years ago | 0

| accepted

Answered
sum over matrix columns
Check if permute was not used as a variable in your code. Type permute

10 years ago | 0

Answered
I want to save figures from script. I have tried "savefig" and "saveas" but these commands don't work in R2011b. How can I solve this problem?
saveas works with Matlab 2011, maybe you are not using it correctly. Try this example t=0:0.1:10 y=sin(t) plot(t,y) save...

10 years ago | 0

Answered
Create Array in Simulink
You can use <http://www.mathworks.com/help/simulink/slref/matlabfunction.html Matlab function block>

10 years ago | 0

Answered
How to generate non repeating random numbers
A=zeros(270,360) The locations of the matrix A are 1:270*360 (using linear indexing) n=270*360 random_location=ran...

10 years ago | 0

| accepted

Answered
log(b,x) works in MuPad but not in the command line
Then use log(x)/log(b)

10 years ago | 0

Answered
logical operations on particular matrix elements
numels = 7; numpts = 3; C = sparse(numpts,numels) A = [3;3;6]; B = [0.383;0.892;0.192] idx=sub2ind(size(C),1:numel(A),A'...

10 years ago | 0

Answered
Calling m file from Simulink
<http://www.mathworks.com/help/simulink/ug/using-callback-functions.html>

10 years ago | 0

| accepted

Answered
Programatic access to Matlab Function block port parameters
Read this <http://www.mathworks.com/matlabcentral/answers/102675-how-do-i-specify-the-matlab-code-for-the-function-in-an-embedde...

10 years ago | 0

Answered
How to read text file
fid=fopen('RainFallReport9.txt') s=textscan(fid,'%s','delimiter','\n') fclose(fid) s=s{:} idx=find(~cellfun(@isempty,regex...

10 years ago | 0

Answered
How to do sum of diagonal element of a matrix?
trace(A)

10 years ago | 1

Answered
How can I create a string with name of a searched file?
f='your_folder' d=dir(fullfile(f,'*bc*.txt')) file={d.name}

10 years ago | 0

| accepted

Answered
How to find the equation of a graph after getting Xdata and Ydata ?
You can find yi by interpolation x = [0 1 2 3 4 5 6 7 8 9 10]; y = [4 3 4 7 12 19 28 39 52 67 84]; xi= 1.5 yi=interp1...

10 years ago | 1

| accepted

Answered
How to group data points
A=[150 151.1 149.6 150.2, 146.1 145.6 144.1 144.9 145.2, 139.9 140.6 138.9] [a,b]=histc(A,[135:5:150 155]) out=accumarray(b'...

10 years ago | 0

Answered
How to store two signal inputs into a matrix or vector?
You can use a <http://www.mathworks.com/help/simulink/slref/mux.html Mux block>

10 years ago | 0

| accepted

Answered
convert Axis to matrix of coordinates
Jack, you are not converting anything. You are, maybe, looking for how to get the x-data and y-data from the plot. For example ...

10 years ago | 1

Answered
How to replace an integer in a vector with another vector?
a=[1 2 3 4] b=[10 20 30] idx=find(a==2) out=[a(1:idx-1) b a(idx+1:end)]

10 years ago | 0

| accepted

Answered
I need to efficiently skip lines in text file
You can use textscan fid=fopen('fic.txt'); str=textscan(fid,'%s','HeaderLines',5,'delimiter','\r\n'); fclose(fid)

10 years ago | 0

Answered
How to plot certain points (or select data of specified range)
idx=M(:,1)<10 & M(:,1)>-10 out=M(idx,:) plot(out(:,1),out(:,2))

10 years ago | 0

Load more