Answered

Change the zero angle of the atan2() or similar

Add an offset to the angle. Let the offset be the starting angle.

Change the zero angle of the atan2() or similar

Add an offset to the angle. Let the offset be the starting angle.

11 years ago | 0

Answered

Urgent!! I need to create a callback function in my GUI and I need HELP!!!

you have a callback function already, but you put all your code in the createfcn which doesn't execute after creation. Try putti...

Urgent!! I need to create a callback function in my GUI and I need HELP!!!

you have a callback function already, but you put all your code in the createfcn which doesn't execute after creation. Try putti...

11 years ago | 0

Question

indexing cell array of arrays

I have a cell array with M arrays of [Nx1] elements in each cell. How do I create a cell array with the same M arrays but with ...

11 years ago | 4 answers | 0

Answered

How to create a weighted random number in matrix?

a = rand(10); % 10x10 matrix b = a>.6; % all elements of a > .6 are 1 all < .6 are 0 60% should be 1's, 40 % should b...

How to create a weighted random number in matrix?

a = rand(10); % 10x10 matrix b = a>.6; % all elements of a > .6 are 1 all < .6 are 0 60% should be 1's, 40 % should b...

11 years ago | 0

Answered

How do I create column names?

Can you use a structure instead with fieldnames of the column names? 1. Read the names in as strings. 2. Read the data int...

How do I create column names?

Can you use a structure instead with fieldnames of the column names? 1. Read the names in as strings. 2. Read the data int...

11 years ago | 0

| accepted

Answered

How do I read in an Excel Spreadsheet with these types of numbers?

I get a different answer 1.0000 0.0344 0.4511 0.2064 0.1404 What matlab appears to be doing is interpretin...

How do I read in an Excel Spreadsheet with these types of numbers?

I get a different answer 1.0000 0.0344 0.4511 0.2064 0.1404 What matlab appears to be doing is interpretin...

11 years ago | 0

| accepted

Answered

calling one function from another

You're calling a function GetSumRect(...) that is not defined.

calling one function from another

You're calling a function GetSumRect(...) that is not defined.

11 years ago | 0

| accepted

Answered

how it works in the following example Vo=Vs.*(Vs>=0)

I believe you are asking what Vo=Vs.*(Vs>=0); does, correct? .* is an element by element multiply. Vs>=0 re...

how it works in the following example Vo=Vs.*(Vs>=0)

I believe you are asking what Vo=Vs.*(Vs>=0); does, correct? .* is an element by element multiply. Vs>=0 re...

11 years ago | 0

| accepted

Question

Copy of one field of a structured array

Is there a way to make a copy of one field of a structured array without doing a loop? I have tried but it just results in the f...

11 years ago | 3 answers | 0

Answered

how can i update my edit box output in GUI

To update the handles.ct (I'm guessing this is your edit text box) function dev_sel_Callback(hObject, eventdata, handles) ...

how can i update my edit box output in GUI

To update the handles.ct (I'm guessing this is your edit text box) function dev_sel_Callback(hObject, eventdata, handles) ...

11 years ago | 0

Answered

FFT and convert the vector to a power of two

Try n = length(x); pow = nextpow2( n ) tam = 2.^pow; x(n:tam) = 0;

FFT and convert the vector to a power of two

Try n = length(x); pow = nextpow2( n ) tam = 2.^pow; x(n:tam) = 0;

11 years ago | 0

Answered

Where is the problem 2

One too many parentheses ). Take one off.

Where is the problem 2

One too many parentheses ). Take one off.

11 years ago | 1

| accepted

Question

multiply each element of structured array, assignment of structured array

I'm not exactly sure if I'm using the right terminology. I have A(1).B = 5; A(2).B = 6; A(3).B = 7; >>A.B ...

11 years ago | 2 answers | 0

Question

vector of strings to cell array

I have a list of numbers as strings that I want to assign to a cellarray. I currently just do a for loop to make the assignment ...

11 years ago | 1 answer | 0

Question

Vector Indexing into 2D array

I have a 2D array and I want to pick out a different row value for each column. Here is an example: A = magic(3) ans ...

11 years ago | 1 answer | 0

Question

Is there a migration path from gui's made in guide to programmatic gui's?

I'm getting tired of GUIDE bogging down. Is there a way to convert my .fig file to a programmatic GUI (other than manually)? Or...

12 years ago | 3 answers | 0

Answered

Using GUI to saving/loading directory.

Put this in your callback [filedat,pathdat] = uigetfile('*.dat','Select a Data File'); Then you can import the file and...

Using GUI to saving/loading directory.

Put this in your callback [filedat,pathdat] = uigetfile('*.dat','Select a Data File'); Then you can import the file and...

12 years ago | 0

Answered

how can i add a sin wave of 400hz with a wav format audio file of 44100hz in matlab ??

44100Hz refers to the sampling rate of the WAV file. Is your sine wave sampled at the same rate but is a 400Hz tone? If so, jus...

how can i add a sin wave of 400hz with a wav format audio file of 44100hz in matlab ??

44100Hz refers to the sampling rate of the WAV file. Is your sine wave sampled at the same rate but is a 400Hz tone? If so, jus...

12 years ago | 0

Answered

How can I start a video in a new window from Matlab?

Use VideoReader() to import the movie, then movie() to play the movie in another window.

How can I start a video in a new window from Matlab?

Use VideoReader() to import the movie, then movie() to play the movie in another window.

12 years ago | 0

Answered

What is the difference between ifft(f) and ifft(f,n)?

if N =length(f), there is no difference between ifft(f) and ifft(f,N)

What is the difference between ifft(f) and ifft(f,n)?

if N =length(f), there is no difference between ifft(f) and ifft(f,N)

12 years ago | 0

Answered

How to make input size the same as output in interp2

you can make the scalar into an array with X = x*ones(1,length(y));

How to make input size the same as output in interp2

you can make the scalar into an array with X = x*ones(1,length(y));

12 years ago | 0

Answered

Save figure as seen on screen?

It's the same ratio at least. You may want to look at using export_fig() which you can download from the file exchange. This wi...

Save figure as seen on screen?

It's the same ratio at least. You may want to look at using export_fig() which you can download from the file exchange. This wi...

12 years ago | 1

Answered

How do I load a previously saved mat-flie into a GUI?

Instead of temp2 = load(walletSum___); try load walletSum.mat or try wS = load(walletSum.mat); temp2 =...

How do I load a previously saved mat-flie into a GUI?

Instead of temp2 = load(walletSum___); try load walletSum.mat or try wS = load(walletSum.mat); temp2 =...

12 years ago | 0

Answered

writing a function in matlab

You can write your function like this: function [out] = myfunction(filenums) % % n = 0; out = zeros(length(fi...

writing a function in matlab

You can write your function like this: function [out] = myfunction(filenums) % % n = 0; out = zeros(length(fi...

12 years ago | 0

| accepted

Answered

Typesetting in a figure legend

Try this: h=legend('$\bar{u}$', '$\bar{\bar{u}}$') set(h,'interpreter','latex')

Typesetting in a figure legend

Try this: h=legend('$\bar{u}$', '$\bar{\bar{u}}$') set(h,'interpreter','latex')

12 years ago | 0

Answered

My First GUI: open a file, read the data, select which columns to plot, then plot it

To update a listbox with tag "mylistbox" with a cell of strings in mylistboxstr set(handles.mylistbox, 'String', mylistbox...

My First GUI: open a file, read the data, select which columns to plot, then plot it

To update a listbox with tag "mylistbox" with a cell of strings in mylistboxstr set(handles.mylistbox, 'String', mylistbox...

12 years ago | 0

Question

For stand-alone exe, how do I include a folder of files and know how to access them.

I have a folder of files I have added to a stand-alone exe. I have been using Desktop->WindowsStandAloneApplication -> Build. ...

12 years ago | 3 answers | 2

Answered

How can I create a variable consisting of data from other (1,1) datasets

use an index P(1) = Pone P(2) = Ptwo ...

How can I create a variable consisting of data from other (1,1) datasets

use an index P(1) = Pone P(2) = Ptwo ...

12 years ago | 0

Answered

Stopping my function from doing iteration (infinite while loop)

function y = mysqrt(x,y0,tol) y = (y0 + (x/y0))/2; while abs(y-y0)>tol y0 = y; y = (y + (x/y)...

Stopping my function from doing iteration (infinite while loop)

function y = mysqrt(x,y0,tol) y = (y0 + (x/y0))/2; while abs(y-y0)>tol y0 = y; y = (y + (x/y)...

12 years ago | 1