Answered
How can I call my Excel sheet values to use in another pushbutton_callback for another algorithm in GUI?
[filename, pathname]=uigetfile FileNameString=strcat(pathname, filename) %Same as FullFileName Yourdata=xlsread(FileNameStri...

11 years ago | 0

| accepted

Answered
How do i create a plot for an implicit function in selected quadrants only?
x1=0:0.1:10 y1=x1.^2 x2=fliplr(-x1) y2=-x2.^2 plot(x1,y1,x2,y2)

11 years ago | 0

Answered
error: Invalid Simulink object handle
Check if Tsmodel is in the current folder, type

11 years ago | 0

Answered
How I delay time in simulink of SimPowerSystems?
You can use <http://www.mathworks.com/help/simulink/slref/unitdelay.html unit delay block>

11 years ago | 0

| accepted

Answered
How to replace a value in function
f=@(x) x^2 som=0 for k=1:3 som=som+f(k) end

11 years ago | 0

Answered
Conveter a string with space in a number
s={' 0 0 , 2 3 ';'1 2 , 1 5 '} a=strrep(s,',','.') b=strrep(a,' ','') out=str2double(b)

11 years ago | 0

Answered
How I can read a CSV file with header?
[a,b,c]=xlsread('PV-20150616.csv') out=b(8:end,:)

11 years ago | 0

Answered
How can I call external m files as a block in simulink?
You can use this block <http://www.mathworks.com/help/simulink/slref/interpretedmatlabfunction.html Interpreted Matlab Function>...

11 years ago | 0

Answered
Adding legend to a plot from an array
lengend(legStr)

11 years ago | 0

| accepted

Answered
How can i load a List Box with filepath and filename using multiple selected file by uigetfile() ???
Try this function pushButton1_Callback(hObject, eventdata, handles) [filename, pathname] = uigetfile('MultiSelect','on'); ...

11 years ago | 0

| accepted

Answered
How I summation graph ? I have photo exemple in this post.
t=0:0.1:10 y1=10*sign(t-5) y2=20*sign(t-5) y=y1+y2 plot(t,y1,'r',t,y2,'g',t,y,'b') If your signal is periodic t=-2...

11 years ago | 0

| accepted

Answered
How do I write variables to a text file with date string in format mm/dd/yyyy and three columns of numerical data and add headers?
date=datestr(datenum('10/01/2014'):datenum('10/10/2014'),'dd/mm/yyyy') var1=(1:10)' var2=sin(var1) header='date var1...

11 years ago | 3

| accepted

Answered
Question about taking data from a .txt file
fid = fopen('fic.txt'); line1 = fgetl(fid); k=0; while ischar(line1) k=k+1; res{k,1}=line1; line1 = fgetl(fi...

11 years ago | 0

| accepted

Answered
How can I combine two text files having different columns in one file?
a=dlmread('a.txt'); b=dlmread('b.txt'); c=[a,b]; dlmwrite('c.txt',c);

11 years ago | 1

| accepted

Answered
access elements of a vector output in one line
s = sin(size(A,1)) Or you can do it this way s=sin(size(A))*[1;0]

11 years ago | 0

Answered
How do I make such plot using axis command?
x=0:0.5:2 , y=10:10:30 plot(y) h=gca xt=get(h,'xtick') set(h,'xtick',linspace(xt(1),xt(end),numel(x))) set(h,'xticklabel...

11 years ago | 0

Answered
Can be run two for loops in parallel?
j= .1:.2:.9 k=0; for i= 1:2:9 (this represents variable like force) k=k+1 a=j(k) % your code end or ...

11 years ago | 0

Answered
How do I make a for loop for summing up to specified integer
n=6 out=sum(1:n)

11 years ago | 0

Answered
solve nonlinear system of equations issue.
Use solve not Solve

11 years ago | 0

Answered
Working with points of a plot?
A=[-2, 3]; B =[5, 3]; C=A+B D=A.*B

11 years ago | 0

Answered
Manipulating Matrix elements based on their index without using a for loop.
[jj,ii]=meshgrid(1:n,1:n); A((ii-n/2).^2+(jj-n/2).^2>n)=0

11 years ago | 0

| accepted

Answered
Extracting data from a cell array
out=cellfun(@(x) x(1:15),YourcellArray,'un',0)

11 years ago | 0

| accepted

Answered
A simple string to Hexadecimal value
a=dec2hex('hello'); out=reshape(a,1,[])

11 years ago | 0

| accepted

Answered
Is it possible to tilt displaying warning messages on the command window?
h=msgbox('Warning') set(h,'color','g')

11 years ago | 0

Answered
Comparing the two structure
a=struct('field1',1,'field2',2,'field3',5) b=struct('field1',3,'field3',4,'field4',6) f1=fieldnames(a) f2=fieldnames(b) f=...

11 years ago | 10

| accepted

Answered
Simultaneously inverting many matrices
Using cellfun will not do it simultaneously. The for loop can be faster. But if you have a Parallel Computing Toolbox, you can d...

11 years ago | 0

Answered
Skip data files while reading input and writing output in matlab code
infilename = sprintf('pt%d.txt',idx); if exist(infilename) %do end

11 years ago | 0

Load more