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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

Beantwortet
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/...

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 3

| akzeptiert

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 1

| akzeptiert

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

Beantwortet
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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 10

| akzeptiert

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

Mehr laden