답변 있음
Updating a matrix using a for loop and if clause. Causing expression to the left of the equals sign is not a valid target for an assignment.
The problem is that you have included { and } around the code. Remove those and it'll work.

11년 초과 전 | 0

답변 있음
How do I vectorize a sum involving an anonymous function?
Tricks to try: bsxfun, summation along the right column/row, replicating matrices as needed (repmat)

11년 초과 전 | 0

답변 있음
Collect response value with two for loops nested
Change: responsesDx= zeros(numTrials,2); responsesSx= zeros(numTrials,2); responses=zeros(numTrials*numBlocks,4); r...

11년 초과 전 | 0

답변 있음
mutual array between two matrix
Two ways: R = setdiff(Z,Y); That'll remove every element of Y that appears in Z. Aleternatively, use this approach ...

11년 초과 전 | 0

답변 있음
Problems with actxserver function for xlswrite?
I am guessing that since you're using an iMac, that you don't have windows installed, and that may explain why you do not have t...

11년 초과 전 | 0

답변 있음
increment two values in a single for loop
There is a cheeky way: for h = 1:110 [i, j] = ind2sub([10,11],h) ... end

11년 초과 전 | 0

답변 있음
Problem with datenum usage
Its a typo: 'yyyymmddHHMN' MN should be MM

11년 초과 전 | 0

| 수락됨

답변 있음
How to read a .dat file, containing binary data?
Ok. You need to open the file, for binary read access. Do that like this fid = fopen('D:\myfile.dat','r'); Then, you ne...

11년 초과 전 | 3

| 수락됨

답변 있음
Can anyone please tell how to find bit error rate or symbol error rate in comparing two text files
if you "bitxor" the pristine (transmitted) file with the recieved file, you'll get mostly zeros (which indicate no issues) and s...

11년 초과 전 | 0

답변 있음
Graph not Plotting Correctly??
It is very unlikely that matlab is plotting incorrectly. It is more likely that there is something going funny in the calc...

11년 초과 전 | 1

답변 있음
xlsread not reading text only excel file
You're only reading out the numbers, you want to read the file with: [numbers, TEXT, everything] = xlsread(file_name); TE...

11년 초과 전 | 1

| 수락됨

답변 있음
Problem with white noise and wav file
It looks like you're doing: signal = valid_data_read_from_file; noise = randomly_generated_noise; signal = noise; % rem...

11년 초과 전 | 0

답변 있음
how to superimpose three matrix
One method: ActualMatrix(:,:,1) = A; ActualMatrix(:,:,2) = B; ActualMatrix(:,:,3) = C; AcutalMatrix(isnan(ActualMat...

11년 초과 전 | 0

답변 있음
Creating mask from coastline
Ok... the method you need to follow is: 1. Take the location you want to find is inside your polygon, and note either the la...

11년 초과 전 | 0

| 수락됨

답변 있음
Splitting a matrix in subsets??
M = [8 25 25 25 25 25; 8 25 36 36 36 36; 8 25 25 15 15 15; 8 25 36 50 50 50; 8 25 25 10 10 10; 8 25 25 6 6 6; 8 25 36 ...

11년 초과 전 | 0

답변 있음
Store results from for loop
what you want to do is to store your output like this: for i = 1:X ... result_V_min_var(i) = V_min_var; V_eff_var_l...

11년 초과 전 | 0

답변 있음
How can I perform modulus operation (mod)?
All the numbers in matlab are represented as binary numbers. Results are _displayed_ as strings. - 1 has 11 different built i...

11년 초과 전 | 0

답변 있음
how to compare two matrix by graph?
matrix1 = rand(3,5); matrix2 = rand(3,5); difference = matrix2-matrix1; imagesc(difference)

11년 초과 전 | 0

| 수락됨

답변 있음
how can i remove the blue color?
You can change the colormap to gray. - That'll make it go from black (low values) to white (high values) You can generate the...

11년 초과 전 | 0

답변 있음
Can matlab functions return a table?
You can return a cell array. This is an example of one. cellarray = {'header 1', 'header 2'; 1 2; 45 76; 'Total' 78}; num...

11년 초과 전 | 0

| 수락됨

답변 있음
Read an excel file from excel file
namefile is a cell array. You need to address it like this: namefile{3,5} You'll need to check if the file exists, if the...

11년 초과 전 | 0

답변 있음
Naming Vectors with Nested For Loop Variables
You're asking for something like this, modified for exactly what you want (i.e., the real data, rather than ones). list...

11년 초과 전 | 0

답변 있음
Loop only storing last run in nested for loop ... should be easy indixing easy for the experienced eye
Simple answer is on the left hand side, you need to index with k, l, i and varname. So, this ought to work: binned_wind_...

11년 초과 전 | 0

답변 있음
How can I merge two strings?
e.g. string1 = 'blah'; string2 = 'bla-de-blah'; string3 = [string1 string2]; You'd need something like: data = ...

11년 초과 전 | 1

답변 있음
Variable Matrix and replace values according to set criteria
matrix = [# x y f]; matrix(matrix(:,2) > 4,4) = 4; % This sets all the flags, where x is greater than 4, to 4. matrix(ma...

거의 12년 전 | 0

답변 있음
How can I generate a noise with a required sensitivily power ? i.e. -174 dBm
First: calculate the power value. -174dBm, is 17.4 orders of magnitude down from "milli", so noise_RMS = 0.001 * 10^-17...

거의 12년 전 | 0

답변 있음
How I get image from axis for checkbox and get processed
The easiest way, is to use the "userdata" of one of your GUI objects, using get & set: set(handles.somerandombit,'Userdata...

거의 12년 전 | 0

답변 있음
Compare Colors of 2 Images
I think that if you define "colour" correctly, that you will easily figure out the right measurement. I also think that you ...

거의 12년 전 | 0

답변 있음
having problem with error "index out of bounds" numel (Y)=1"
The error is actually quite clear: Before calling the fixp function, you're setting "Y" to be a scalar. Inside the fix...

거의 12년 전 | 0

답변 있음
Problem about converting Matlab code into execution file
Assuming you've generated the exe correctly, the machine you're trying to run it on will need to have some of the matlab runtime...

거의 12년 전 | 0

더 보기