15 Nov 2023 |
rollskatflat | DimensionMismatch: arrays could not be broadcast to a common size | 10:43:21 |
rollskatflat | My guess is SVector is actually a static Vector and the .* Is trying to do an element wise multiply across the two, rather than treating myVec as a single value. | 10:53:33 |
qwjyh | .* treated Vector{SVector} as you want. In this case, myQuat is also broadcasted and cause dimension mismatch. To handle this correctly, you need to wrap myQuat with Ref .
julia> Ref(my_quat) .* my_vec
5-element Vector{SVector{3, Float64}}:
For more information, see .* (and broadcast ) in the help mode.
| 14:00:38 |
qwjyh | * .* treated Vector{SVector} as you wanted. In this case, myQuat is also broadcasted and cause dimension mismatch. To handle this correctly, you need to wrap myQuat with Ref .
julia> Ref(my_quat) .* my_vec
5-element Vector{SVector{3, Float64}}:
For more information, see .* (and broadcast ) in the help mode.
| 14:00:51 |
qwjyh | * Indeed, .* treated Vector{SVector} as you wanted. In this case, myQuat is also broadcasted and cause dimension mismatch. To handle this correctly, you need to wrap myQuat with Ref .
julia> Ref(my_quat) .* my_vec
5-element Vector{SVector{3, Float64}}:
For more information, see .* (and broadcast ) in the help mode.
| 15:52:44 |
rollskatflat | Thank you so much! | 20:05:44 |
20 Nov 2023 |
| Songtao Gui joined the room. | 07:11:30 |
28 Nov 2023 |
| @norliana:matrix.org joined the room. | 18:50:55 |
| @norliana:matrix.org left the room. | 19:13:55 |
30 Nov 2023 |
| @finlifin:matrix.org left the room. | 15:34:47 |
1 Dec 2023 |
| @malte:maltee.de joined the room. | 10:30:28 |
@malte:maltee.de | I'm trying to convert a system from discrete to continuous, not by using d2c but by replacing z^-1 by exp(-s*T) as this provides a more accurate representation. How would I do that (for a MIMO state space system)? | 10:41:38 |
@malte:maltee.de | The best way I can think of is to separate the system in its matrices, assemble everything with a continuous instead of discrete delay and re-assign the input/output names. That's just very clunky for what should be a fairly simple operation. | 10:51:38 |
@malte:maltee.de | can I even assign input and output names to delay systems? | 10:54:54 |
@malte:maltee.de | If I could get an equivalent of setDelayModel from MATLAB, that would also suffice | 11:32:55 |
8 Dec 2023 |
| csantosb joined the room. | 21:58:16 |
10 Dec 2023 |
@malte:maltee.de | is there an easy way to use use a negative sign in connections of the connect function of RobustAndOptimalControl ? | 19:29:37 |
14 Dec 2023 |
| benjamin changed their profile picture. | 13:36:58 |
26 Dec 2023 |
@malte:maltee.de | Is this room still alive or is this the widow of a libera.chat bridged room with all the action happening on the IRC side? | 08:52:15 |
rollskatflat | People still use IRC a lot? | 09:51:26 |
@malte:maltee.de | ¯\_(ツ)_/¯ | 09:52:46 |
@malte:maltee.de | I noticed julialang.org mentions zulip, slack and discord, so this room is unofficial? | 09:53:22 |
27 Dec 2023 |
vchuravy | it's not yet active enough to be official | 14:22:32 |
@malte:maltee.de | Has anyone ever suggested to bridge the different channels? I know slack and discord can be bridged to matrix. Having multiple channels on multiple platforms seems quite inefficient. | 14:55:05 |
28 Dec 2023 |
@hasnep:matrix.org | I know the Julia Slack can be strict about not archiving the messages on there in any way because they like the ephemeral disappearing messages, so they'd probably be against a bridge | 01:46:30 |
dionisos | Hi, I am trying to pass a type as an argument of a function, which create other function, using this type (to avoid type instability). But I get this error:
ERROR: LoadError: syntax: local variable NodeType cannot be used in closure declaration
| 17:29:43 |
dionisos | * Hi, I am trying to pass a type as an argument of a function, which create other functions, using this type (to avoid type instability). But I get this error:
ERROR: LoadError: syntax: local variable NodeType cannot be used in closure declaration
| 18:02:19 |
dionisos | function create_function(Type)
function test(a::Type, b::Type)
return a+b
end
return test
end
test = create_function(Int)
| 18:03:41 |
dionisos |
ERROR: LoadError: syntax: local variable Type cannot be used in closure declaration
| 18:04:07 |
dionisos | * function create_function(MyType)
function test(a::MyType, b::MyType)
return a+b
end
return test
end
test = create_function(Int)
| 18:04:33 |