0
votes
2answers
19 views

MATLAB: How do I graph multiple functions on the same graph?

How can I graph multiple functions on the same graph/plot/Cartesian plane on MATLAB with domain and range restrictions? For example I made up the following functions below. How would I graph the ...
1
vote
0answers
20 views

How To Change The Parameters Of A Function In Real Time With Matlab

I'm working on a sound modifier that would: 1) Get inputs from a user (X,Y) 2) Apply effects to a predetermined sound file using the X and Y The code is a bit hard to follow so I'll not post it ...
0
votes
1answer
21 views

How do I input an image name into a function in MATLAB?

Basically, what I'm trying to do is run the following function directly from the command window in MATLAB. My function itself is: function reconstruct_2(im_input,d,c,k) rgbpic = imread(im_input); ...
-4
votes
1answer
31 views

How to plot a several functions in matlab for n converges to infinity? [closed]

Can anybody help me and tell me how to plot these functions in matlab: n!*log(n) sqr(n) (n+1)! log^2(n) n log(n^n) Where n is a natural number and converges to infinity?
-2
votes
0answers
33 views

Could someone help me with this function plot? [closed]

I have the math relations between Pc, N and CW, as shown in Fig. 1. Now I want to set Pc's value as 0.05, and plot the function of N and CW. (the first equation in Fig. 1 changed to 0.05=1-Pt-Pi, and ...
0
votes
1answer
27 views

How to call an m file from another m file in MATLAB and retrieve an output?

I know this is a simple question, but for some reason I can't find a straight answer that works no matter where I look. Basically, I have 4 values that were found in one m file, and I want to run ...
1
vote
1answer
25 views

Saving return values of function returning multiple variables in Matlab

I have never used matlab before so excuse this very basic question. Basically I have a function that returns multiple variables, defined like so: function [a, b, c]=somefunction(x, y, z) I know I ...
3
votes
1answer
34 views

how to control return variable in matlab

i want to clarify how to control returning of variables from function in matlab,for exmaple let us consider this code function [x y z]=percentage(a) n=length(a); maximum=0; minimum=0; ...
0
votes
0answers
37 views

Filling a matrix, the same way as “fill.m” fills a figure

I'd be glad if someone could tell how to fill a matrix the same way as the function "fill.m" fills a figure. Is there an already existing function in Matlab which does this already? An alternative ...
0
votes
1answer
15 views

MATLAB function open works in workspace, but not in function

I am trying to create a video file with MATLAB. Here is my function: function [vidObj] = createVideo(frames, frameRate, filename) %Create video object num_frames = size(frames,2); vidObj = ...
0
votes
1answer
31 views

Matlab - Access the output a function inside another function

I am trying to access the output of a function from another function. I have the following fucntion: function f = doSomething f = 5+6; In another function I'm calling doSomething as follows: ...
0
votes
1answer
48 views

How to access inbuilt functions?

As what should I be typing in the Command Window to get the function file to open? Usually I get a link to them when debugging and an error occurs, but what command can be used to access them ...
-1
votes
2answers
57 views

How can I do multithreading in my own function? [closed]

I am having Intel Core i3 - 2350M Processor 2.30 GHz Processor, 2 GB RAM, 320 GB Hard Drive and MATLAB R2011a. I want to do multi threading in my own function explicitly. So that I can execute one ...
0
votes
2answers
43 views

Converting a matrix in a text file to a grayscale image

So I'm a bit confused about something. I created a function in C to calculate some values and store them in a matrix file. This matrix file opens in notepad and contains rows and columns of float ...
3
votes
1answer
50 views

Matlab error : ??? Subscript indices must either be real positive integers or logicals

I've a problem with a function that I've written by myself. I've not found in any question how to solve it by myself so I post it here hoping that someone's going to see what I didn't see... (It's my ...
0
votes
2answers
34 views

Changing values in matrix in matlab via a function call

I have a matrix full of zeros. I would then like to change one 0 at a time to the value one. It has to be me deciding which element I would like to change. I have tried the following: classdef ...
1
vote
2answers
82 views

How to installed “not found” function on Matlab?

I am using Matlab R2010a on Windows 7 64 bit machine. When I was using imfindcircles function, I got some error. >> [centers, radii] = imfindcircles(image,[100 400],'ObjectPolarity','dark') ...
0
votes
1answer
38 views

Storing data in matrix format in simulink

Is it possible to store data in a table or matrix format during the simulation? I have created a enabled subsystem inside which is a embedded function block. Whenever the subsystem gets enabled( on ...
0
votes
0answers
96 views

Matlab Translation “circshift” function [closed]

Hi I have a part to do in a coursework and i am having difficulty understanding it can someone please just point me in the right direction? What i have done so far is seperate an image into three ...
-1
votes
1answer
27 views

Error in Matlab, calling a function

The errors are: Error in getvalues (line 4) faceNoNoise = wiener2(x, [5 5]); Output argument "mouthTall" (and maybe others) not assigned during call to "C:\Users\Trent\face\getvalues.m>getvalues". ...
0
votes
1answer
49 views

Find the index of numerically closest value [duplicate]

Say I have 2 matrices in matlab : A = [1 4 6 9 11 13 15 18 21] B = [2 10 19] Is there a function I can use so that, for every element in B, I am able to find the index of the closest value to ...
0
votes
1answer
69 views

MATLAB GUI Programming with ODE

I am new to programming and I have to create a matlab gui code with ordinary differential equations (ODE) then graph said equation. The problem I am having is the format where a function for the ode ...
0
votes
1answer
53 views

Function error in MATLAB

I'm pretty new to MATLAB and I have the following code: a=500; PI=3.14159265; radconvert=PI/180; degconvert=180/PI; % values at t=9, t=10 and t=11 respectively alpha=[54.80 54.06 53.34]; beta=[65.59 ...
0
votes
0answers
65 views

Matlab - 3 parameters model fitting to experimental data

I collected some experimental data which gave me two vector: hits and false alarm. What I need to do now is to use matlab to fit a specific model (see the model details below) to this data and see ...
1
vote
1answer
28 views

Matlab different function over different intervals

I would like the function y to be zero if temp is less than 0.5 and exp(x) otherwise. However what i tried below just sets all of y to zero. Any suggestions? x = 0:.01:2; tmp = x.^2; if tmp<0.5 ...
1
vote
2answers
57 views

Mathematica Table function to Matlab

I need to convert this to Matlab code, and am struggling without the "table" function. Table[{i,1000,ability,savingsrate,0,RandomInteger[{15,30}],1,0},{i,nrhhs}]; So basically, these values are all ...
5
votes
3answers
77 views

Distinguish between scripts and functions programmatically

Given a file name, how can I programmatically distinguish between scripts and functions in MATLAB? If I attempt to pass an argument to a script, I get Attempt to execute SCRIPT somescript as a ...
0
votes
2answers
78 views

Matlab: how to write a vector of a few points as a continuous function?

I have two vectors: x = [0; 1; 2] y = [2.0000; 0; -14.7781] If I will plot x and y I will see three points on the xy-plane. But I want to connect those three points and get them as a continuous ...
1
vote
1answer
18 views

Symbolic function input non-symbolic parameters

I need to define a function that returns a symbolic matrix (sym). It takes 4 input parameters- 2 symbolic matrices, and 2 integers. How do I do that? This is what I was trying to do- %my function ...
0
votes
1answer
133 views

How can I convert cartesian coordinates to polar coordinates using function

I'm trying to create a function in MATLAB that takes a cartesian coordinate and converts it to polar. function [homework5] = Cartesian(X,Y) M = size(X,1) for N=1:M if X,Y; r=sqrt(X^2+Y^2) ...

1 2 3 4 5 12
15 30 50 per page