Respondida
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...

alrededor de 11 años hace | 0

| aceptada

Respondida
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)

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 0

Respondida
how can i use legend command when i am using hold on for plotting graphs? in my plot i want to use legend command to indicate the color for respective plot that is black for low pass,blue for high pass,green for power complementary,red for all pass.
Use the legend function after the three plots close all k = input('Number of frequency points = '); %%256 w = 0:pi/...

alrededor de 11 años hace | 0

| aceptada

Respondida
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)

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

Respondida
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>...

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

| aceptada

Respondida
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'); ...

alrededor de 11 años hace | 0

| aceptada

Respondida
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...

alrededor de 11 años hace | 0

| aceptada

Respondida
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...

alrededor de 11 años hace | 3

| aceptada

Respondida
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...

alrededor de 11 años hace | 0

| aceptada

Respondida
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);

alrededor de 11 años hace | 1

| aceptada

Respondida
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]

alrededor de 11 años hace | 0

Respondida
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...

alrededor de 11 años hace | 0

Respondida
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 ...

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

Respondida
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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

Respondida
Is there a way to combine multiple figures of different runs of m file?
You can use subplot

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 0

Respondida
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=...

alrededor de 11 años hace | 10

| aceptada

Respondida
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...

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

Cargar más