Respondida
How to have a user prompt window to submit real time values
@Stelios, The questions I've seen from you today could easily be answered by thinking a bit more about what you're doing and act...

más de 7 años hace | 0

| aceptada

Respondida
Cell array to matix
"i want to get all matix in the cell array as seprate martrix in workspace" The follow-ups to that question will be how do I cr...

más de 7 años hace | 0

Respondida
open a variable in a function
"the workspace in scope, which is the 'base' workspace during a callback" Not at all. The workspace in scope is that of the cal...

más de 7 años hace | 0

Respondida
Why I get this error of matrices not consistent? What's wrong?
The icon is the 3rd input of msgbox, not the second. In fact, if you want to specify a custom icon, you've used the completely w...

más de 7 años hace | 1

| aceptada

Respondida
ismember for table rows gives error for NaN and string
"One condition I need is that if the row has more columns, I want the table to be amended by "NaN" or otherwise empty columns, s...

más de 7 años hace | 0

| aceptada

Respondida
plot a cell array
Assuming that nae means name and that's what you want the legend to show for each row: hlines = plot(cell2mat(yourcellarray(:, ...

más de 7 años hace | 0

Respondida
How to average 5 rows of a vector recursively?
As long as the length of your vector is a multiple of 5: mean(reshape(yourvector, 5, []), 1) If the length is not a multiple o...

más de 7 años hace | 1

Respondida
multiple area access in cells
If you want to keep your data as cell arrays you don't have a choice but to use an explicit loop: for i = 1:numel(D) D{i...

más de 7 años hace | 0

| aceptada

Respondida
extract elements from four matrices and create new matrix
If your 4 4x4 matrices are not already stored as 4x4x4 3D array, well why not? and make them so: matrices = cat(3, m1, m2, m3, ...

más de 7 años hace | 0

Respondida
Multiplying a matrix in a cell by another matrix in the same cell
Since each cell array contains matrices that are all the same size (in this case, column vectors), you would make your life much...

más de 7 años hace | 2

| aceptada

Respondida
convert the binary matrix with correct position
Your code: % removing 3 lsbs from the image binimg=de2bi(binimg,5); That comment is completely wrong. binimg is already a bi...

más de 7 años hace | 0

Respondida
Undefined function 'datatype' for input arguments of type 'uint8'.
It looks like together with your extract function you should have a datatype function. That function is missing. It's for you to...

más de 7 años hace | 0

| aceptada

Respondida
I need to know what function to use here?
Certainly, the problem is easy to solve using nsidedpoly. 5 lines of code (1 line for the anonymous function that converts wall ...

más de 7 años hace | 1

| aceptada

Respondida
calculate iteration in cellfun
Ok, now it's clearer what you want to do. I'm assuming that the number of cells and the size of each cell in Y, returned by Test...

más de 7 años hace | 0

| aceptada

Respondida
How do I find the nearest value to a number that is bigger than that number?
First, your command is overly complicated. arrayfun always pass scalar values to its function, so the x is your anonymous functi...

más de 7 años hace | 1

| aceptada

Respondida
Matching index in 3rd column based on 1st and 2nd column
First, define a simple function: function [maxval, maxtime] = maxvaluetime(values, times) %find the maximum of values, a...

más de 7 años hace | 1

Respondida
Syntax question - renaming a variable
"I defined up=y(1) because I wish that matlab evaluates the diff(up) for every k and the syntax diff(y(1)) doesn't seem to work"...

más de 7 años hace | 1

| aceptada

Respondida
how read acceleration data for BNO055
I doubt that anybody on this forum knows your particular sensor so I'm afraid the most likely answer would be: read (or re-read)...

más de 7 años hace | 0

| aceptada

Respondida
How do I clear the screen after typing a part of for loop ?
Once you've started with a for (or while) statement at the command prompt, matlab waits for you to enter the corresponding end s...

más de 7 años hace | 0

| aceptada

Respondida
Re-assigning numerical subjects IDs to string user IDs from experimental data
The 1st and 3rd output of unique is what you want. e.g.: %completely made up demo data. Using a table for neatness. It doesn't ...

más de 7 años hace | 0

| aceptada

Respondida
How do I remove NaN and / or interpolated data?
A=[1 NaN 3 4 NaN 6 5 NaN NaN 0 NaN NaN 7 8 NaN 0 0 9] %remove columns with more than 4 nans A...

más de 7 años hace | 0

| aceptada

Respondida
trouble importing multiple .csv files with strings in first row
csvread (and dlmread) can't read the headers of csv files. You can tell them to skip the header: data(i)=csvread(l(i).name, 1, ...

más de 7 años hace | 2

| aceptada

Respondida
Use of handle in matlab 2013b
Does R2013b support function handles? Yes. Function handles have existed since before R2006a. Irrespective of that Is it a good...

más de 7 años hace | 0

Respondida
Stem plot inside a for loop
Numbered variables, fields, etc. are almost always a bad idea. You end up writing meta-code to manipulate the variable, field, w...

más de 7 años hace | 1

| aceptada

Respondida
How to dynamically change a function to solve a list of problems?
In some ways your question is strange because the solution is to use an array of functions handles instead of an array of functi...

más de 7 años hace | 0

| aceptada

Respondida
using strcmp on nested cell array (cell array within a cell array)
I'm not entirely clear if you want to look inside the inner cell arrays or not. If not: lookup = 'something'; rows = find(cel...

más de 7 años hace | 3

| aceptada

Respondida
sorting a matrix then applying the sort to another matrix
"How do I use this data to create a new 3 column matrix where column 1 is elevation column 2 is azimuth, and each row is a uniqu...

más de 7 años hace | 0

Respondida
Reading raw data from binary file
I'm not sure what the problem is. After you've read the first header with your multiple fread just read the bytes of the remaini...

más de 7 años hace | 0

Respondida
grouping first (left column) and last (right column) of consecutive sequence of a Nx2 matrix
You haven't clearly defined what consecutive values means mathematically. I'm assuming a difference of 1. Also you haven't expla...

más de 7 años hace | 0

| aceptada

Respondida
how to generate binary matrix of mxnxp
Your question is not very clear. The code you show generates a matrix of integer between 0 and 3 (included), not 0 and 1, becaus...

más de 7 años hace | 0

Cargar más