I am thinking of writing the data to a file. Does anyone have an example of how to write a big amount of data to a file?
edit 1: Most elements in the matrix are zeroes, others are uint32. I guess the simplest save() and load() would work, as @Jonas suggested.
...
I tried to use mlab.path(path,'/my/path') but failed. Got NameError: name 'path' is not defined in python. Anyone has an idea?
...
Matlab keep give me following error message :
??? Error using ==> dir
Argument must contain a string.
Error in ==> Awal at 15
x = dir(subDirs)
Below is my codes :
%MY PROGRAM
clear all;
clc;
close all;
%-----Create Database-----
TrainDB = uigetdir('','Select Database Directory');
TrainFiles = dir(TrainDB);
dirIndex = [TrainFile...
I am drawing a simple bar diagram in MATLAB. The problem is, that the value
at x = 0 lets the y-axis disappear partially. Is there a way to bring the y-axis
to the front instead of hiding between the y-value for x=0? Is there any
option I can make sure the y-axis is always in the front?
...
Hello,
I would like to know what is the use of having inputs in brackets like this :
[fx, fxx] = differentiate(...)
why is fx and fxx in square brackets ?
Another example includes this [y,t,ysd] = step(m)
Please explain !
Thanks
...
I have an object-oriented MATLAB app that needs a GUI, and I'd like to use GUIDE for the layout (at least). I've tried the manual way, and doing the control positioning is just too painful.
I've noticed that GUIDE is very much procedurally-oriented; it generates M-files that assume they are run from the path and aren't associated with a...
I have a simple function
function increase(percent, number)
low = number - number*percent;
end
I want to return low so I can use it as an argument for another function
mitoGen(asp, arg, increase(0.2, 234), glu)
Is there a way to do this?
...
I'm using the PRTools MATLAB library to train some classifiers, generating test data and testing the classifiers.
I have the following details:
N: Total # of test examples
k: # of
mis-classification for each
classifier and class
I want to do:
Calculate and plot Bayesian posterior distributions of the unknown probabilities of mis...
Is there a way to get the mex file for a built-in MATLAB m- file? If yes, how? If no, does that mean I have to write the C code myself (oh nooo!!!)
...
Is there a way to just run the matlab (7.9.0) editor and not the rest of the "desktop" on linux?
...
I want to compute a diffusion kernel, which involves taking exp(b*A) where A is a large matrix. In order to play with values of b, I'd like to diagonalize A (so that exp(A) runs quickly).
My matrix is about 25k x 25k, but is very sparse - only about 60k values are non-zero. Matlab's "eigs" function runs of out memory, as does octave's ...
I have a MATLAB function that I've compiled into a .net library. The function is a simple one that takes a character array as an input and a numeric array as output:
function insert = money(dateLimit)
..
insert = [1 2];
The function works fine when no function arguments are specified (a default argument is provided inside the function)...
hey
I want to compare two images using matlab and display a message 'it is the same image'
or.'sorry , it's not the same image' My program always displays 'it is the same image'.
Mycode is:
i1=imread('001_1_1.fig');
i2=imread('001_1_1.fig');
x1=edge(i1,'canny');
j1=imcrop(x1,[135 90 100 95]);
x2=edge(i2,'canny');
g=0;
xxx=1;
yyy=1;
...
I have a 2-by-3 matrix, and I want to sort it according to the first column. Here's an example:
data will change to --> new data
11 33 10 22
22 44 11 33
10 22 22 44
I have this code for sorting a matrix A but it doesn't work well:
sort(A,1,'ascend');
...
I have a set of code that, depending on how the program is initiated, will either be executed locally or sent to a remote machine for execution. The ideal way I imagine this could work would look something like the following:
line_of_code = 'do_something_or_other();';
if execute_remotely
send_via_udp(line_of_code);
else
eval(li...
I have created a blank GUI and now I want to program a push button to display a file or directory browser dialog.
...
Does MATLAB have a function that will "snap an image" or move an image to some predefined location if within a certain area?
...
hi,
how to Assign a value to a static text in GUI MATLAB.
...
Hi,
I'm looking for how can I display an image in my GUI in a specific region of my interface.
...
I'm getting this error:
Error in ==> APP>pushbutton2_Callback at 109
img=imread(FileName)
When I try to use FileName in pushbutton2_Callback I'm getting the error mentioned
FileName is variable in pushbutton1_Callback.
...